LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   uploading via FTP causes wrong umask (https://www.linuxquestions.org/questions/linux-networking-3/uploading-via-ftp-causes-wrong-umask-442605/)

tensigh 05-07-2006 08:31 PM

uploading via FTP causes wrong umask
 
Hello,

I upload files to my webserver via FTP. I design pages in Dreamweaver and use FTP to upload them to my webserver (the FTP daemon only accepts requests from my inside network, so it's secure).

The problem is each webpage gets a umask of 640, so the permissions don't allow read access in the "other" group. They show up as -r-xr-----. I have to log in to the server and manually change each page using chmod 644 *.html in each directory.

Anyone know how to change this? I went into the .bash_profile of the account I use to FTP to the server and added "umask 644" but it still doesn't work.

Thanks,
-C

Linux.tar.gz 05-07-2006 09:32 PM

You have to make changes in the server's ftp server configuration file.

tensigh 05-08-2006 12:56 AM

That's what I figured, but...
 
what do I look for? I did a locate ftpd.conf and didn't find anything. This is a Debian Sarge install. Kernel is 2.6.x.

nabeelmoidu 05-08-2006 01:47 AM

I believe the default ftp server in Debian Sarge is proftpd
In any case the Umask parameter should work in most ftp servers. Maybe your server is taking some default value for it .Try adding the umask value as a separate line in your conf file for the ftp server.Also tell us which ftp server u use

Linux.tar.gz 05-08-2006 07:53 AM

Do a "locate proftpd.conf" in order to find it, then look inside.

tensigh 05-08-2006 09:42 AM

I'm using in.ftpd
 
To use FTP I just uncommented the line for in.ftpd in /etc/inetd.conf and restarted. I did a locate in.ftpd but I can't find a config file.

tensigh 05-08-2006 09:58 AM

It looks like I'm using in.ftpd
 
Quote:

Originally Posted by nabeelmoidu
I believe the default ftp server in Debian Sarge is proftpd
In any case the Umask parameter should work in most ftp servers. Maybe your server is taking some default value for it .Try adding the umask value as a separate line in your conf file for the ftp server.Also tell us which ftp server u use

Thanks for the reply. Apparently I'm running in.ftpd. I found a config file under /etc/pam.d/ftp, but I don't see where I can add either umask=644 or ftpd -u 644

nabeelmoidu 05-09-2006 11:20 AM

I am not familiar with running ftp servers in xinetd or inetd.
But the PAM file that you saw is not the one to look at.
If you find any .conf file you might see an option there.
try a find or slocate for .conf and grep for ftp in the result

tensigh 05-09-2006 11:28 AM

That's a good idea
 
I'll try that. If I can't find one maybe I'll disable it in inetd and just use proftpd. That might make more sense. I can spend hours tracking this down or spend minutes installing and configuring a better FTP program.

nabeelmoidu 05-09-2006 12:13 PM

Hey
i think i found it out
in the file for ftp under inetd.d (or where you specify the configs for services under inetd)
add the value umask 077 ( or whatever you want)
inside the braces for service
where you set the options like protocol,user,access_from,max_load etc


All times are GMT -5. The time now is 11:12 PM.