I just moved my Wordpress site from my old webspace over to my new Debian server running Froxlor. Before migrating the files and database, I had created a new domain under my customer account and assigned a new folder to this domain. After moving the files and database, everything worked fine, except I kept getting warnings about missing file permissions whenever I was trying to change something. I checked the folder permissions on the server and found that they were assigned to the correct user and group (robin:robin), also the file permissions looked alright. However, just to be sure, I did a chmod -R 775 so all the files would be user writable, group writable, world readable and world executable (I know this could be a security risk, but I put it in as it's required to open folders, and there aren't any script files in that directory that could be executed anyway).
However, this didn't help whatsoever, I still kept getting the same issues. Then, I thought, hmmm? Isn't it really the www-data group and user that run all the scripts, as these are the user and group that Apache is assigned to? As I didn't want to give all the files a chmod of 777 (thus making them world writable) I run usermod -G www-data robin, thus adding the user which Froxlor created to the www-data group.
Well, after having done this, everything seems to work now since Apache now has write access to all files - well, I guess that's good as long as I'm the only person running php / script-based stuff on the web server. But what if, say, I want to be nice to a mate and let them host their blog on my webspace as well? After all, I'd have to add him to the www-data group as well, thus ultimately giving him unrestricted write access to my own website, something I wouldn't really want to do?
So, the question I really have is: is what I've done really the only possible way out, or am I just missing the obvious? Also, if it *really* is the only way, what can I do so no other "customer" will get write permission on my personal stuff?
Question
robin24
Hi all,
I just moved my Wordpress site from my old webspace over to my new Debian server running Froxlor. Before migrating the files and database, I had created a new domain under my customer account and assigned a new folder to this domain. After moving the files and database, everything worked fine, except I kept getting warnings about missing file permissions whenever I was trying to change something. I checked the folder permissions on the server and found that they were assigned to the correct user and group (robin:robin), also the file permissions looked alright. However, just to be sure, I did a chmod -R 775 so all the files would be user writable, group writable, world readable and world executable (I know this could be a security risk, but I put it in as it's required to open folders, and there aren't any script files in that directory that could be executed anyway).
However, this didn't help whatsoever, I still kept getting the same issues. Then, I thought, hmmm? Isn't it really the www-data group and user that run all the scripts, as these are the user and group that Apache is assigned to? As I didn't want to give all the files a chmod of 777 (thus making them world writable) I run usermod -G www-data robin, thus adding the user which Froxlor created to the www-data group.
Well, after having done this, everything seems to work now since Apache now has write access to all files - well, I guess that's good as long as I'm the only person running php / script-based stuff on the web server. But what if, say, I want to be nice to a mate and let them host their blog on my webspace as well? After all, I'd have to add him to the www-data group as well, thus ultimately giving him unrestricted write access to my own website, something I wouldn't really want to do?
So, the question I really have is: is what I've done really the only possible way out, or am I just missing the obvious? Also, if it *really* is the only way, what can I do so no other "customer" will get write permission on my personal stuff?
Thanks for any help and clarification!!! :-)
Robin
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.