Submitted by cgfix on Sat, 02/25/2012 - 17:38
I have a problem with virtualmin users fighting for permission over files with www-data. Is there anyway to give one over the other or something?
Basicly if I drag a file on the ftp, then www-data can not write to it. And if www-data creates a file, I need sudo permission to change it and cant do that in regular ftp. This does not seem right. Normaly the ftp user has permission over www-data right?
I guess what I am use to is when my web application creates a file, normaly on commercial hosting, the file is given ownership of the ftp user and not www-data. And the web application does not have any problem writing to files that are owned by the ftp user.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Sat, 02/25/2012 - 18:23 Comment #1
Is your domain in Virtualmin set to run PHP scritpts using CGI or fastCGI modes? These run with domain owner permissions, so files won't be created owned by
www-data
. You can configure this at Server Configuration -> Website Options.Submitted by cgfix on Sat, 02/25/2012 - 20:15 Comment #2
ok I had to install suexec to run as CGI mode. But still files are create as www-data. And then when I try restarting apache, I get this error when ever CGI mode is turned on.
" Syntax error on line 16 of /etc/apache2/sites-enabled/test.jon.conf: Invalid command 'Action', perhaps misspelled or defined by a module not included in the server configuration "
refers to Action application/x-httpd-php5 /cgi-bin/php5.cgi
wait a minute actions is not enabled...
Yea it woks! You guys rule.
Submitted by andreychek on Sat, 02/25/2012 - 20:16 Comment #3
Did you use the install.sh script to install Virtualmin? If not, that would explain why suexec isn't installed and configured. You may want to look at the manual installation guide in the documentation for details on setting up suexec.
But if you're not using CGI or FCGID, you would indeed have the problem that you're describing there.
You may want to go into Server Configuration -> Re-Check Config to make sure it doesn't detect any problems with your setup. If you installed suexec and are still having problems, there's some issues that the re-check config can detect.
However, it looks like you're using Virtualmin GPL there. The Support area here is for Virtualmin Pro customers -- if you're using Virtualmin GPL, we'd encourage you to use the forums for support. We monitor the forums, along with lots of other wonderful folks from the community. Thanks!
Submitted by cgfix on Sat, 02/25/2012 - 20:53 Comment #4
Oh, I thought this was the forum. how funny. Anyway, I got it figured out.
thanks for your help.
Submitted by JamieCameron on Sat, 02/25/2012 - 22:18 Comment #5
Submitted by Issues on Sat, 03/10/2012 - 22:34 Comment #6
Automatically closed -- issue fixed for 2 weeks with no activity.