Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Yet another file permission problem 1

Status
Not open for further replies.

LawnBoy

MIS
Joined
Mar 12, 2003
Messages
2,881
Running vsftpd 2.0.4-17 on OpenSuSE 10.1.

I have a user that ftp's some data files from his windows box to his SuSE home dir. on my webserver every 10 minutes. A couple of CGI scripts then parse that data for a webpage.

The permissions on these files are 311. Seemingly at random the permissions on just these ftp'd files will change to 300, preventing the CGI from reading them. I can set them back to 311 and everything is fine for a day/week/month, then the problem happens again.

The user's umask is 0022.

Can somebody buy me a clue? When the user logs in to the console new files are granted 311 permisions. Is vsftp doing something odd here?

 
311? Are you sure about that? i.e. --wx--x--x? Very strange permissions to be using... are you sure they're not 644, i.e. -rw-r--r--?

Annihilannic.
 
D'oh, of course. I've been parsing things backwards all week. Must be all that Xmas cheer...

So they're at 644 and randomly change to 600.

 
Is file_open_mode set in your vsftpd.conf? If so, what is the setting?

It doesn't sound to me like vsftpd is responsible in this case because of the erratic behaviour... it sounds more like a cron job or audit script or user are manually changing the permissions. Maybe set up a script to monitor the permissions of the files on a regular basis to try and identify a pattern...

Annihilannic.
 
I don't have a file_open_mode setting in vsftpd.conf, but I did find local_umask=077. I didn't realize ftp doesn't use the system umask. I've set local_umask to 022, this should solve my problem.

Thx for the help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top