• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Default Owner of /var/lib/php

Izaim

Basic Pleskian
Hi,

What are the defualt permission and owner for directory '/var/lib/php/sessions'.

I get this error:
The session save path '/var/lib/php/sessions' is not writable.

URL: http://ads.almakos.com/www/admin/install.php

Since I upgraded to Onyx and Ubuntu 16, the default dir owner of 'var/lib/php' was root : root. I changed to www-data : psacln but I am getting the same error.
 
Hi Izaim O.,

What are the defualt permission and owner for directory '/var/lib/php/sessions'.
The correct permissions are:

drwx-wx-wt ( => 1733 ) root root

I changed to www-data : psacln
What makes you think, that these are the correct permissions?


Pls. post the output of the following commands from your command line:
Code:
stat /var/lib/php/sessions

find /etc/php -type f -name "php.ini" -exec grep --color -Hni "session.save_path"  {} \; | grep --color -Hni /var/lib/php
find /etc/php5 -type f -name "php.ini" -exec grep --color -Hni "session.save_path"  {} \; | grep --color -Hni /var/lib/php

find /opt/plesk -type f -name "php.ini" -exec grep --color -Hni "session.save_path"  {} \; | grep --color -Hni /var/lib/php
 
Hi Izaim O.,


The correct permissions are:

drwx-wx-wt ( => 1733 ) root root


What makes you think, that these are the correct permissions?


Pls. post the output of the following commands from your command line:
Code:
stat /var/lib/php/sessions

find /etc/php -type f -name "php.ini" -exec grep --color -Hni "session.save_path"  {} \; | grep --color -Hni /var/lib/php
find /etc/php5 -type f -name "php.ini" -exec grep --color -Hni "session.save_path"  {} \; | grep --color -Hni /var/lib/php

find /opt/plesk -type f -name "php.ini" -exec grep --color -Hni "session.save_path"  {} \; | grep --color -Hni /var/lib/php

stat /var/lib/php/sessions
File: '/var/lib/php/sessions'
Size: 1921024 Blocks: 3760 IO Block: 4096 directory
Device: 902h/2306d Inode: 63442989 Links: 2
Access: (7733/drws-ws-wt) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2016-12-08 01:14:00.976597900 +0100
Modify: 2016-12-08 01:14:14.000642343 +0100
Change: 2016-12-08 01:14:14.000642343 +0100
Birth: -

find /etc/php -type f -name "php.ini" -exec grep --color -Hni "session.save_path" {} \; | grep --color -Hni /var/lib/php
(standard input):3:/etc/php/7.0/cgi/php.ini:1306:;session.save_path = "/var/lib/php/sessions"
(standard input):7:/etc/php/7.0/fpm/php.ini:1306:;session.save_path = "/var/lib/php/sessions"
(standard input):11:/etc/php/7.0/cli/php.ini:1306:;session.save_path = "/var/lib/php/sessions"
(standard input):15:/etc/php/7.0/apache2/php.ini:1306:;session.save_path = "/var/lib/php/sessions"

NO PHP5 DIR, I DONT USE PHP5.

find /opt/plesk -type f -name "php.ini" -exec grep --color -Hni "session.save_path" {} \; | grep --color -Hni /var/lib/php
(standard input):3:/opt/plesk/php/7.0/etc/php.ini:1318:session.save_path = "/var/lib/php/sessions"
 
Hi Izaim O.,

Access: (7733/drws-ws-wt) Uid: ( 0/ root) Gid: ( 0/ root)
Pls. see again:
The correct permissions are:

drwx-wx-wt ( => 1733 ) root root
You have set:
drws-ws-wt ( => 7733 ) root root

;)

Consider as well to uncomment:
(standard input):15:/etc/php/7.0/apache2/php.ini:1306:;session.save_path = "/var/lib/php/sessions"
... to avoid possible issues with the "old" - standard Ubuntu path "/var/lib/php5".
 
Last edited by a moderator:
Hi Izaim O.,


Pls. see again:

You have set:
drws-ws-wt ( => 7733 ) root root

;)

Consider as well to uncomment:

... to avoid possible issues with the "old" - standard Ubuntu path "/var/lib/php5".


Dear,
I ran the command "sudo chmod -R 1733 /var/lib/php/" several times but the permissions are still the same. 7733.

Chmod not working .. It is not changing the first numer from 7 to 1.
 
Hi Izaim O.,

first of off, you should consider to change ONLY the permissions for the depending folder ( /var/lib/php/sessions ) and not for the whole recursive folder and files under "/var/lib/php".... :rolleyes:

Second, if the directory file size is LARGER than 1 MB, you have to recreate that folder:

Check the directory size over your command line ( logged in as user "root" ):
Code:
du -h /var/lib/php/session

Remove and re-create the folder ( logged in as user "root" ):
Code:
rm -rf /var/lib/php/session
mkdir /var/lib/php/session
chmod 1733 /var/lib/php/session/
 
Back
Top