• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Question about Permissions

O

olddocks

Guest
Last night i messed with permissions on my server and dont know what is the default permissions need to be set for

/var/www/vhosts/domain.com/httpdocs
/var/www/vhosts/domain.com

- what should be the permissions for the folders above?
- who should i set for owner and group ownership (i believe recursive)
- I noticed the group or owner of some files is root? would this post a security risk?

The reason i messed up with my folder i as i connect to FTP i couldnt write or rewrite the files in httpdocs folder.
 
File/Folder privileges always as less as possible ;)

/srv/www/vhosts/domain.com should be mode 755 for user and group root.

chmod 755 /srv/www/vhosts/domain.com
chown root.root /srv/www/vhosts/domain.com

For the httpdocs it should be restricted to the ftp_user of the domain and group psaserv (psa server/apache),
and files below httpdocs/ should be owned by ftp-user and group psacln (psa client):
chmod -R 755 /srv/www/vhosts/domain.com/httpdocs/*
chown ftp_dom1.psacln/srv/www/vhosts/domain.com

e.g. /srv/www/vhosts/domain.com/
drwxr-x--- 5 ftp_dom1 psaserv 4096 Nov 6 15:06 anon_ftp
drwxr-xr-x 2 root psaserv 4096 Nov 6 15:06 bin
drwxr-x--- 3 ftp_dom1 psaserv 4096 Mar 17 2005 cgi-bin
drwxr-x--- 2 root psaserv 4096 Nov 6 15:07 conf
drwxr-xr-x 2 root psaserv 4096 Mar 17 2005 error_docs
drwxr-x--- 19 ftp_dom1 psaserv 4096 Aug 22 2005 httpdocs
drwxr-x--- 8 ftp_dom1 psaserv 4096 Aug 22 2005 httpsdocs
drwxr-x--- 2 root psaserv 4096 Nov 6 15:06 pd
drwx------ 2 ftp_dom1 root 4096 Aug 22 2005 private
dr-xr-x--- 7 root psaserv 4096 Nov 6 15:06 statistics
drwxr-xr-x 2 root psaserv 4096 Nov 6 15:06 subdomains
drwxr-xr-x 2 root psaserv 4096 Nov 6 15:06 web_users

e.g. /srv/www/vhost/domain.com/*
-rw-r--r-- 1 ftp_dom1 psacln 10891 Jul 15 2005 index.html

Concerning your 3rd question, i say, just keep a minimum of privileges.
I normally have less then those above. For example for /srv/www/vhosts/domain.com
i use mode 750 - why should other users have privileges to access the directory,
if only one has FTP? But those privs above are the defaults of plesk i think.
 
Back
Top