简体   繁体   中英

Adminer Nginx try to login but "Permission Denied"

So when my I already setup server and installed centOS 7.6, php 7.4.14, nginx 1.16.1, mariadb, and testing the server http://server_host_or_IP/info.php, and it worked.

After that I decided to setup Adminer , I put adminer-4.7.8.php to /usr/share/nginx/html/ and try to login using username:root & password, the respond was "session is expired please try to login again".

So I checked the info.php to check where the location of session.save_path I commit this command:

chown nginx:nginx /var/lib/php/session

And then:

 sudo chmod -R 777 /var/lib/php/session

When I try to login using username:root & pass it says permission denied. I even try to use:

sudo chmod -R 640 /var/lib/php/session

but its still says permission denied. Any solutions?

I chowned /var/lib/php/session to nginx:root and I can login.

Oddly, originally its owner and group was root:apache.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM