Jump to content

[SOLVED] basic question on chmod


quiettech

Recommended Posts

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.