File permission issues


Im having issues with the file permissions on my accounts. Let me fisrt say that this is a fresh install of virtualmin on a centos 6 system. istalled via istall.shand AMP was not installed before installing virtualmin so virtualmin took care of php, apache and mysql.

After creating a virtual server which has a home/doaminname/public_html directory i have tried to istall an instace of prestashop on it. I uploaded the zip file using the webmin filemannager and uziped and all is ok untill now. i am able to acces the istall script for prestashop but during installation it gives me that certain folders need a 755 file permissions. Upon connecting with filezila, i noticed that the folders in question have the correct filepermissions.

Using webmin filemannager i ched for the file permissions but noticed the following: while the file ownership of the /home/domainname/public_html folder is correct for the domain, everything in that folder still has the ownership set to root for user and group.

some additional info:
Automatically add appropriate SuExec directive? se to YES
Add Apache user to Unix group for new servers? Yes, Apache user is APACHE
Permissions on website subdirectory 0755
Default PHP execution mode FCGId (run as virtual server owner)

and here are the directives for apache:

ServerName ${DOM}
ServerAlias www.${DOM}
DocumentRoot ${HOME}/public_html
ErrorLog /var/log/virtualmin/${DOM}_error_log
CustomLog /var/log/virtualmin/${DOM}_access_log combined
ScriptAlias /cgi-bin/ ${HOME}/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory ${HOME}/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch

<Directory ${HOME}/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch

Could anyone give me a hint on how i could make the ownership for that domain so it works with the user?
Thank you in advance,


When using the Webmin filemanager, what user were you logged in as – was that the Virtual Server owner, or root?

If you were logged in as root, that would indeed cause the problem you’re describing.

However, when logged in as the Virtual Server owner, files should always be created as that user, and not root.

Now, in order to fix that issue –

What you could do is go into Limits and Validation -> Validate Virtual Servers -> Fix Permissions, and in there you can reset the permissions for the files in one or more accounts.


Ahh yes, you are correct sir, I was able to fix permissions like you instructed and all works just dandy now :slight_smile:
Thank you for your help Eric