quiettech Posted April 10, 2008 Share Posted April 10, 2008 Hello all, My experience on linux and apache is still very limited. So this may be quite the noob question. However being so tied up with the PHP learning process, I would appreciate if you apologized me for not looking for an answer myself and instead do the lazy thing and post here. I'm trying to control access to some files on my webhost through chmod. Basically I want certain files to be set to 600 and folders to 700, limiting their access to the owner only. However something I've read earlier confused me... If these files were uploaded through FTP, does this really mean Apache is not the owner? How can I revert that? I'm chmoding the files the quick way after uploading them and from within the FTP client application. Quote Link to comment Share on other sites More sharing options...
effigy Posted April 10, 2008 Share Posted April 10, 2008 If these files were uploaded through FTP, does this really mean Apache is not the owner? How can I revert that? This depends on the user or settings--I'm not very familiar with FTP. You can use chown to change the owner of the file and chgrp to change the group. Quote Link to comment Share on other sites More sharing options...
quiettech Posted April 10, 2008 Author Share Posted April 10, 2008 Thank you effigy. Looking over these two commands on the web. I've checked with the help of 'dir' that indeed that the owner of these files is ftpusers. All I need to know now is how is apache identified in the system so I can change these files ownership. Any ideas? Quote Link to comment Share on other sites More sharing options...
effigy Posted April 10, 2008 Share Posted April 10, 2008 These are indicated by the User and Group directives in Apache's configuration (httpd.conf). Quote Link to comment Share on other sites More sharing options...
quiettech Posted April 10, 2008 Author Share Posted April 10, 2008 Most excellent. Thank you! Quote Link to comment Share on other sites More sharing options...
trq Posted April 11, 2008 Share Posted April 11, 2008 I'm not fimiliar with ftp either but you should also be able to configure your ftp server to save files as a specific user, check your /etc directory for a config file relating to whatever ftp server your using. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.