Operating System - HP-UX
1833126 Members
3618 Online
110051 Solutions
New Discussion

a directory owned by root:root, and 777, but could not ftp a file into it?

 
SOLVED
Go to solution
Hanry Zhou
Super Advisor

a directory owned by root:root, and 777, but could not ftp a file into it?

I have a directory /abc on destination server. It is owned by root:root, and I purposely set it to 777. However, I can not ftp a file from a source server to that directory. The error message on the source server is:
/abc/filename: permission denied.

Can you please let me know what cause the problem?

Thanks,
none
18 REPLIES 18
IT_2007
Honored Contributor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

looks like you don't permission to access file from source. Please check permissions of the file on the source.
A. Clay Stephenson
Acclaimed Contributor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

You must also have read permission of the file on the source server. In addition to the standard UNIX permissions, you also must to conform to any rules specified in the ftpaccess file.
If it ain't broke, I can fix that.
Vladimir Fabecic
Honored Contributor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

Please post output of:
# ls -l /abc/filename
In vino veritas, in VMS cluster
Hanry Zhou
Super Advisor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

I do have the permission to read the source file, and plus I can ftp the file over to /tmp directory on the destination server. Lastly, the error message in the ftp session is complainning about /abc/filename which is located on the destination server.

so, I believe the problem is on the destination server, not on the source server.

none
V. Nyga
Honored Contributor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

Hi,

does the file already exists at the destination?

V.
*** Say 'Thanks' with Kudos ***
A. Clay Stephenson
Acclaimed Contributor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

Is /abc literally the directory or is that an example? You need to check the directory search permissions all the way down the chain. The other "gotcha" can be that the permissions on the mountpoint may be very restrictive and that is the fundamental problem. You will need to umount the filesystem to see these permissions.
If it ain't broke, I can fix that.
Hanry Zhou
Super Advisor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

/abc is the mountpoint, and whide open to the world. It is currently empty, nothing under this file system. What I am trying to do is put the file right under this mount point, /abc/filename. /abc is not a real name on the server.

I checked /etc/fstab file, there are no restrictions on it at all.

none
bhargavi
Advisor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

Plz check to the ftpaccess file.
Try changing your name as the owner of the directory in the destination server and ftp it again.
MarkSyder
Honored Contributor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

Is the file you're trying to copy on an NFS mount? That's caught me out before.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Hanry Zhou
Super Advisor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

No, it is not NFS fs.

I did even change the ownership of the file system /abc to myself, a personal id on the destination server, but still not working.

ther is no /etc/ftpd/ftpaccess file at all on both dest and src servers.
none
MarkSyder
Honored Contributor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

You changed the ownership to yourself! So you're not logging in as root?

You may have the same login name on both servers but do you have the same numerical user id?

Mark
The triumph of evil requires only that good men do nothing
Hanry Zhou
Super Advisor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

I am running ftp not as "root", but my personal id, and the numeric number is the same on both dest and src servers.

Remeber, the destination directory or fs /abc is wide open 777, and owned by root:root, I even tried change the ownership to my personal id.

on src server:
ftp dest_server

...
200 PORT command successful.
553 /abc/passtest: Permission denied on server. (Upload)
none
A. Clay Stephenson
Acclaimed Contributor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

Okay, humor me and umount /abc and then set the permissions (temporarily) on /abc to 777 and repeat your FTP tests with the filesystem unmounted. This will put your file in the / filesystem but it will eliminate one possible problem.
If it ain't broke, I can fix that.
mobidyc
Trusted Contributor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

Hello,

my friend google have said me:
A 533 is usually incurred by having SPACES and/or INVALID CHARACTERS ((-!"£$%^&*'#~) ) in the file name. Check the file name and try again. The reason we have to upload file names all one word with no spaces and with no invalid characters is because our FTP server is a UNIX server and the Unix file structure has these specifications.

maybe you're in this situations?

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
mobidyc
Trusted Contributor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

sorry, i've wrotten 533 error code but i'm weel talking of 553 error.

on http://kb.globalscape.com/Article.aspx?id=10142 :
553 - Requested action not taken. File name not allowed. Try changing the file name, or getting rid of spaces in the file name.

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
Hanry Zhou
Super Advisor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

I did test as Clay suggested, but got the same error. The problem not only happent on this particular fs, also on some other fs's on dest. But, there are no problems to ftp files over to /tmp, and some other file systems on dest.

on dest:
umount /abc
mkdir /abctest
chmod 777 /abctest

then on src:
ftp the dstt
...
200 PORT command successful.
553 /abctest/passtest: Permission denied on server. (Upload)
none
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

Okay, change your ftpd entry in /etc/inetd.con to include -l -v so that verbose messages are added to syslog. Issue an inetd -c so that these changes take effect and start a new ftp session. The verbose messages should indicate the problem.
Have you done a bdf to make certain that no filesystems (especially /var are full)? Have you made certain that ACL's are not in play on the filesystems? I would also like to see all the options on the ftpd entry in /etc/inetd.conf.
If it ain't broke, I can fix that.
Hanry Zhou
Super Advisor

Re: a directory owned by root:root, and 777, but could not ftp a file into it?

I found the cause of the problem.

It seems like there is control directive in /etc/wu_ftpd, "upload" controles which directories could be ftp to. Just found out we are using wu)ftpd.

Thanks all for help. Especially to Clay, because after his suggestion, I checked /etc/inetd.conf
none