LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   How to modify ftp files permission? (https://www.linuxquestions.org/questions/linux-security-4/how-to-modify-ftp-files-permission-808526/)

jeesun 05-18-2010 02:37 AM

How to modify ftp files permission?
 
Hi

I have a ftponly user "rom" in my box. This is used by our vendor to send files through ftp. When they send files the ownership of files are all the same as user name group created in this machine.

But our application engineers use another user name "deb" to process these file. But as the owner of these file are "rom", they cannot process with their user. Manually they modify the user name and group and then they able to process.

The group ID of the two users are different and its application dependent.

how should the ownership will be modified automatically or is there any workaround or script to modify the ownership of these file for application user's?

__raHulk 05-18-2010 03:28 AM

The same way as you would have changed permission to a linux file

Code:

chmod mode remote-file-name
will do

jeesun 05-18-2010 10:43 PM

I know the chmod command. But I'm not expecting such kind of suggestions.

The user who pushes files in my server has only ftponly user. It's not able to login in any way in the server other than ftp.

What I'm saying is that, how can I set or modify the files permission automatically while arriving in my server?

__raHulk 05-19-2010 06:13 AM

Quote:

The user who pushes files in my server has only ftponly user. It's not able to login in any way in the server other than ftp.
What I meant to say is that you could use that command in FTP login also.

Quote:

What I'm saying is that, how can I set or modify the files permission automatically while arriving in my server?
Ok then you can try using umask for that.

jeesun 05-19-2010 11:00 PM

Yeah, I understand. But problem is that, This user can only do ftp. and no shell is associated in this user. And the ftp user is a remote office, who's are only responsible for upload files in our server.

If there is no profile i can't set umask.

__raHulk 05-20-2010 02:59 AM

OK, Now lets play with the vsftpd.conf file.
man vsftpd.conf
look for umask

umask settings for files ftp'ed are governed by the settings of this file.

Here I'm Just giving U a hint.

And I'm sure you'll be happier after discovering the answer yourself.

And don't forget to use four digit umask number.

Cheers!!!


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