LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I have an ftp server on proftpd and... (https://www.linuxquestions.org/questions/linux-newbie-8/i-have-an-ftp-server-on-proftpd-and-653969/)

trist007 07-06-2008 08:50 PM

I have an ftp server on proftpd and...
 
I got this daemon running on fedora 8. I put some files up on the ftp server. I made sure to chmod 777 all the stuff, so I can log in via cute ftp and create folders, edit files, etc. However, I put some files up. I chmod 777 them. Now, I went to my website where these files are posted. I'm using a web browser, and I go into the web page that has these files. I try to download these files but the browser says I do not have permission. Since I'm using http I can't download these files as my user name. Of course I could go to the url and put ftp and login as my user, but I want to make this file available to everyone.

I'm thinking I need to use the chown command. I need to make it available to everyone. So I'm guessing the command would go something like this?

chown everyone filename ???

How should I go about it? Instead of chown each and every file, how do I chown everything in a directory?

trickykid 07-06-2008 09:31 PM

chown -R

man chown for all available options and the man page.

But I don't think this is an ownership issue, if the files have -rwxrwxrwx across the board, then they should be accessible. Make sure your proftpd daemon or server doesn't have a umask setting changing the permissions of these files.

btmiller 07-06-2008 09:31 PM

There's no way to change ownership to everyone (your command would try to change ownership to a user named everyone, which likely doesn't exist). Each file has one and only one owner. However, chmod 777 should allow everyone all permissions. Have you verified that permissions are sert correctly (with ls -l)? How about the parent directory? Is Apache even configured to serve up files from your FTP login area (usual it only serves files from /var/www/html or the like)?

You can use the -R flags to chown/chmod to make them recursive. Be careful, though -- this can have unintended side effects (like removing executable permission from a directory so no one can cd to it). Additionally, you should probably not just make everythign world writeable -- this is bad from a security standpoint. It only needs to be readable by the Apache user for Apache to serve it up.

trickykid 07-06-2008 09:33 PM

Quote:

Originally Posted by btmiller (Post 3206066)
There's no way to change ownership to everyone (your command would try to change ownership to a user named everyone, which likely doesn't exist).

I think they were referring to the recursive option, to change the ownership of all files in directory.

trist007 07-06-2008 09:40 PM

Yeah permissions are maxed across the board, 777
on the proftpd.conf
it has a umask 022
should I change this to something else?

Yeah, I'll set the permissions later to only be usable by the Apache user, however, I do want some files to be available to all, so that anybody could download them off my website.

So later on, when I wanna make it usable only by user, I just chown the dir(root directory of the ftp, not root as in root) -R ?

trist007 07-07-2008 12:39 PM

bumping the bump


All times are GMT -5. The time now is 06:05 AM.