• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

I have crashe Plesk 9.3

G

Grossmann-Grupp

Guest
Hi!


I have crashed the User and Group Rights in
/var/www/vhosts/ or better say /var/www/
Please let me know how I can set back all Owner and Group Names.

Which rights need /var/www/... and which Groups

Actualy:
Group - root & apache
Owner - root & ftp

With Permissions: rwxr-x--- / 0755

Please help with the right commands. I didn´t know the right way to fix this problem...

Thanks allot!

King Regards

Joerg
 
For example:

# ll /var/www/
total 32
drwxr-xr-x 13 root root 4096 Feb 8 16:28 atmail
drwxr-xr-x 3 root root 4096 Feb 8 16:05 cgi-bin
drwxr-xr-x 3 root root 4096 Feb 8 16:03 error
drwxr-xr-x 3 root root 4096 Feb 8 16:05 html
drwxr-xr-x 3 root root 4096 Feb 8 16:24 icons
drwxr-xr-x 3 root root 4096 Feb 8 16:23 manual
drwxr-xr-x 2 webalizer root 4096 Feb 9 02:49 usage
drwxr-xr-x 7 root root 4096 Feb 15 14:28 vhosts

# ll /var/www/vhosts/
total 16
drwxr-xr-x 10 root root 4096 Feb 8 16:06 chroot
drwxr-xr-x 14 root root 4096 Feb 8 23:07 cronjob.tld
drwxr-xr-x 5 root root 4096 Dec 30 09:17 default
drwxr-xr-x 14 root root 4096 Feb 15 14:28 safemode.tld

# ll /var/www/vhosts/cronjob.tld/
total 48
drwxr-x--- 5 cronuser psaserv 4096 Feb 8 23:07 anon_ftp
drwxr-xr-x 2 root psaserv 4096 Feb 8 23:07 bin
drwxr-x--- 3 cronuser psaserv 4096 Feb 8 23:07 cgi-bin
drwxr-x--- 2 root psaserv 4096 Feb 9 19:42 conf
drwxr-xr-x 2 root psaserv 4096 Feb 8 23:07 error_docs
drwxr-x--- 7 cronuser psaserv 4096 Feb 15 14:03 httpdocs
drwxr-x--- 7 cronuser psaserv 4096 Feb 8 23:07 httpsdocs
drwxr-x--- 2 root psaserv 4096 Feb 8 23:07 pd
drwx------ 2 cronuser root 4096 Feb 8 23:07 private
dr-xr-x--- 7 root psaserv 4096 Feb 8 23:07 statistics
drwxr-xr-x 2 root psaserv 4096 Feb 8 23:07 subdomains
drwxr-xr-x 2 root psaserv 4096 Feb 8 23:07 web_users

# ll /var/www/vhosts/safemode.tld/
total 48
drwxr-x--- 5 safemodeftp psaserv 4096 Feb 15 14:28 anon_ftp
drwxr-xr-x 2 root psaserv 4096 Feb 15 14:28 bin
drwxr-x--- 3 safemodeftp psaserv 4096 Feb 15 14:28 cgi-bin
drwxr-x--- 2 root psaserv 4096 Feb 15 14:39 conf
drwxr-xr-x 2 root psaserv 4096 Feb 15 14:28 error_docs
drwxr-x--- 7 safemodeftp psaserv 4096 Feb 15 14:28 httpdocs
drwxr-x--- 7 safemodeftp psaserv 4096 Feb 15 14:28 httpsdocs
drwxr-x--- 2 root psaserv 4096 Feb 15 14:28 pd
drwx------ 2 safemodeftp root 4096 Feb 15 14:28 private
dr-xr-x--- 7 root psaserv 4096 Feb 15 14:28 statistics
drwxr-xr-x 2 root psaserv 4096 Feb 15 14:28 subdomains
drwxr-xr-x 2 root psaserv 4096 Feb 15 14:28 web_users

For vhosts you can set correct permissions with

/usr/local/psa/admin/bin/vhostmng with --set-content-permissions option (--help for details)
 
Some Options run, some not...

Hi Igor!

Thanks for your very fast awnser!!!
I have set for one cronuser the settings with "chown !cronuser! /var/www/vhosts/!crownuser.tld! -R" and
"chgrp !cronuser! /var/www/vhosts/!crownuser.tld! -R"
( I have 20 Cronuser's ) How can I speed up this work? Did you know a option to make this step faster than one by one?

Than the command "/usr/local/psa/admin/bin/vhostmng --set-content-permissions option" (--help for details) won`t work. Please explaine how this command works with a example.

At last... the "safemode.tld" is missing complete. "cronuser.tld" is a placeholder for the name of the TLD.
Please let me know more about this misterious "safemode.tld"

King Regards


Joerg
 
cronuser, safemode.tld, etc. - it is just my SAMPLES!!! You have own domains, users, etc on your server!

And did you read help for vhostmng command?

Try it with

/usr/local/psa/admin/bin/vhostmng --help
I hope it will help you with understanding.
 
Hi Igor!


Thanks for explain "safemode.tld" and "usermod.tld"... ;)
But the Help "/usr/local/psa/admin/bin/vhostmng --help" was not realy helpfull.

First I have change all Groups and Owner to Root. After this step I start with the next Step...

chown *cronuser* /var/www/vhosts/*crownuser.tld*/*Dir* -R;
chgrp psaserv /var/www/vhosts/*crownuser.tld*/*Dir* -R;

(All in * * must be change to your own Data! If you have more than 1 Command-Line you can use the ; to start Command after Command with one step!)

After this step I use the Commands:
chmod 700 /var/www/vhosts/*cronuser.tld*/private/;
and:
chmod 751 /var/www/vhosts/*cronuser.tld*/*Dir*/;

(All in * * must be change to your own Data! If you have more than 1 Command-Line you can use the ; to start Command after Command with one step!)

for all Dir's to set the right "Rights" ;-)

If you have more than 1 *usermod.tld* you can prepare all Command Lines in the Notepad / Text Editor before posting in the Shell. That is a good way to work with this commands.

Hope you think my way is the same way as your way...

Much Thanks for your realy great Help!!!!!!!!!!!!


King Regards

Jörg

PS: Now I have to fix the Problem with the Mails... Somebody can't send Mails to my Mail Adresses *LOL*
 
Jörg,

If you have a problems with recovering your system permissions you can contact Papallels support team. They will fix it for you.
 
Back
Top