• 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

Reset /var/www permissions

D

dbasch

Guest
I did something less than smart and changed the permissions on the /var/www directory.

I managed to fix the permissions on the vhost subfolders using vhostmng.

I don't know how to fix the non-vhost /var/www permissions though.

This obviously causes problems with things like cgi_wrapper, atmail, etc..

Anyone know how to reset the non-vhost /var/www/* permissions?

Thanks!
 
Is this just the permissions? Or owners as well?

What version of Plesk are you using, and the OS?
 
Sorry, I should have given more information

I changed the permissions and the owner.

I am running Plesk 9.3.0 on Linux Cent OS.

Thanks for the help!
 
Hi Igor,

Unfortunately, that only restores the owners and permissions for the individual virtual host directories.

My problem is the /var/www directory.

Cheers,
Derek
 
Find a packet to which files or directories belongs with

# rpm -qf /var/www/some_file

for example and then set all default permissions for files from this package with

# rpm --setperms package_name.rpm
# rpm --setugids package_name.rpm
 
I gave the rpm package permissions a try, but the files are not owned by a package:

file /var/www/cgi-bin/cgi_wrapper/cgi_wrapper is not owned by any package

file /var/www/atmail/reademail.php is not owned by any package

Thanks for all the help everyone.

Hopefully I can get this fixed.
 
I have more information on my problem.

I believe that I have now fixed the owner and permissions on the /var/www directory and non vhost subdirectories.

I still get suexec FCGI errors.

I am trying to execute PHP files from a subdomain with the default Apache configuration:
<Directory /var/www/vhosts/example.com/subdomains/mysubdomain/httpdocs>

<IfModule mod_fcgid.c>
<Files ~ (\.php)>
SetHandler fcgid-script
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
Options +ExecCGI
allow from all
</Files>
</IfModule>

Options -Includes -ExecCGI

</Directory>
This is the suexec error:
[2011-08-09 04:56:55]: uid: (10003/al_admin) gid: (2522/2522) cmd: cgi_wrapper
[2011-08-09 04:56:55]: target uid/gid (10003/2522 or 2521) mismatch with directory (0/2521) or program (0/0)
Executing the root vhost CGI test file of http://example.com/cgi-bin/test/test.cgi works correctly. It does not use the CGI wrapper:

<IfModule mod_fcgid.c>
<Files ~ (\.fcgi)>
SetHandler fcgid-script
Options +FollowSymLinks +ExecCGI
</Files>
</IfModule>

Options -Includes +ExecCGI

I have tried the fixes listed here but they did not work:
http://kb.odin.com/en/430

This seems to be a problem specific to executing PHP files that use the CGI wrapper.
 
Last edited by a moderator:
What about contacting Parallels Support Team instead of reinstallation?
 
My license key does not offer support. I will try to submit it to my host.
 
My host could not fix the problem either. I was forced to start fresh with a new Plesk 10.1 instance. Frustrating.
 
Back
Top