I am hosted on a linux CentOS, have root access
The Apache logs are all stored in /var/log/virtualmin
The way it was setup: each shell/sftp user had read access to their own log files in the above directory, but not to their archives
So, one of my colleagues who had root access, tried adding one of the users to a group, etc and screwed it up. Now no user can read the log files.
How do i reset the permissions of the log files without having to reinstall virtualmin all over again?
Please help. Thanks a ton, in advance
hi I am not an expert at this however i can at least provide you with the settings i have on my system (i run Debian not Centos)
Firstly, the /var/log/Virtualmin directory itself ownership is root:root with permissions 0711. However, the files inside that directory are owned by virtualservers:apache (not root:root) and also have 0660 as permissions. See below…
In Webmin>Others>Filemanager navigate to
select the log files according to the username (ie all of the logs that belong to specific usernames)
Then go to the tools menu>change ownership
Make sure each file is owned as
virtual-server-name:www-data (or it might be “httpd” for Centos?)
In my case i run debian, so if “one” of my virtual servers in virtualmin was called Adam, an example of ownership owner Adam:www-data. You are running Centos, is its apache webserver name httpd? If so you would use httpd instead of www-data
In mine all permissions for /var/log/virtualmin are set to 0660
To do this in /var/log/virtualmin/ choose the “Select all” button (found to the left of File menu),
Then go to “Tools” > Change Permissions (then set all permissions to 0660
You may need to also repeat this process for every page in your log file (if there are more than one page of logs)
I hope this is enough to sort your problem out
Thank you so so much!
The “tools->change permissions” in Virtual min is greyed out. I have root access. So, i guess “Make sure each file is owned as virtual-server-name:www-data (or it might be “httpd” for Centos?)” you mean it is the same as chown on shell, right? chown [OPTIONS] USER[:GROUP] FILE(s) ?
Thanks once again
yes the tools>Change permissions will be greyed out.
You must first “select” the folders and files you want to change permissions on,
Only after you have actually selected at least one folder or file will that option will not be greyed out anymore and you will be able to change the ownership and permissions within the Virtualmin interface as i have explained.
If the problem still exists it surely can be fixed with database software solutions.