System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

ownership of file is not correct after ftp

 
Santhosh.c
Advisor

ownership of file is not correct after ftp

I have created a ftp user in my system. I can ftp the files and all commands are working. But the interesting thing here is the owner of the file and directory is not the ftp user which I am using. I am giving here some info about user and files

$ ftp dmocoi

Name (dmocoi:schovva): dfsdsftp
331 Password required for dfsdsftp.
Password:
230 User dfsdsftp logged in. Access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.

ftp> mkdir test1
257 MKD command successful.
ftp>
-------------------------
Now the directory created is like this

dmocoi:/imsfeeds1/ftp/home/dfsdsftp # ls -ld test1
drwxrwxr-x 2 bcmkftp imsftp 96 Sep 9 11:55 test1
dmocoi:/imsfeeds1/ftp/home/dfsdsftp #

Note : the owner of the dir is bcmkftp
---------------------------------
This is the id info for both user

dmocoi:# id bcmkftp
uid=2525(bcmkftp) gid=493(imsftp) groups=288(ftpgroup)
dmocoi:# id dfsdsftp
uid=2764(dfsdsftp) gid=493(imsftp) groups=288(ftpgroup)

Hope you understand the problem. Any idea why it is happening like this?

Thanks,
Santhosh




santhosh
14 REPLIES 14
Tingli
Esteemed Contributor

Re: ownership of file is not correct after ftp

Might be the upper level directory is owned by bcmkftp.
Santhosh.c
Advisor

Re: ownership of file is not correct after ftp

this the upper level directories
dmocoi:/imsfeeds1/ftp/home # ll
total 10
drwxrwx--- 4 bcmkftp imsftp 1024 Feb 26 2009 bcmkftp
drwxrwx--- 5 blintftp imsftp 1024 Jul 31 16:46 blintftp
drwxrwx--- 3 cstcrftp imsftp 96 Feb 18 2009 cstcrftp
drwxrwx--- 7 dfsdsftp imsftp 1024 Sep 9 11:08 dfsdsftp
drwxrwx--- 5 grnfdftp imsftp 1024 Feb 17 2009 grnfdftp
drwxrwx--- 5 touchftp imsftp 1024 Mar 5 2009 touchftp
dmocoi:/imsfeeds1/ftp/home #
santhosh
Tingli
Esteemed Contributor

Re: ownership of file is not correct after ftp

And what will be the result of command dir under ftp prompt?
Santhosh.c
Advisor

Re: ownership of file is not correct after ftp

ftp> ls -l
200 PORT command successful.
150 Opening ASCII mode data connection for /usr/bin/ls.
226 Transfer complete.
ftp>
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /usr/bin/ls.
226 Transfer complete.
ftp>
Thanks,
Santhosh
santhosh
Highlighted
Tingli
Esteemed Contributor

Re: ownership of file is not correct after ftp

I am sorry. How about after you have created directory, then dir.
Yogesh M Puranik
Valued Contributor

Re: ownership of file is not correct after ftp

Hi,

Can u pls specify ur prob. clearly ??



Rgds

Yogesh
bullz
Super Advisor

Re: ownership of file is not correct after ftp

remove the directory and try creating it again.

I guees it doesn;t make difference as it has the value of 775 :)

Try with the other user which is GID is difference
Santhosh.c
Advisor

Re: ownership of file is not correct after ftp

Can u pls specify ur prob. clearly ??
-----------
Hi Yogesh,

This user(dfsdsftp) is FTP user whith no login shell. this user can upload data in home directory and should be able to list the files/directory. As I mentioned earlier, the owner of the files which uploaded by 'dfsdsftp' is become some other user(bcmkftp). because of this the file is not visible by the user "dfsdsftp".
Hope this is clear for you. please let me know if any other question.
Thanks,
Santhosh
santhosh
Sudeesh
Respected Contributor

Re: ownership of file is not correct after ftp

can you check if you have any duplicate UID in /etc/passwd file for the ftpuser in question
The most predictable thing in life is its unpredictability