Operating System - HP-UX
1836109 Members
2421 Online
110089 Solutions
New Discussion

ftpaccess overwrite - permission denied

 

ftpaccess overwrite - permission denied

 
"...it's turtles all the way down."
8 REPLIES 8
G. Vrijhoeven
Honored Contributor

Re: ftpaccess overwrite - permission denied

Hi,

Does the user/group have write access on the file, or write access on the dir the file is created in?

Do you have /etc/ftpd/ftpaccess file and if so what did you configure?

HTH,

Gideon

Re: ftpaccess overwrite - permission denied

Thanks for the note - this is the upload statement on my ftpaccess file :

upload /home/ftp * yes bob group2 0640 nodirs

user bob and group2 are not the same as the ftp account/group dropping the file.

Any advice?
"...it's turtles all the way down."

Re: ftpaccess overwrite - permission denied

I'm hoping someone here can help me. I'm using ftpaccess to limit a ftp account login.

The user is set up with its own login and group which is listed as the guestgroup.

In the ftpaccess file I change the ownership of the file via the upload line.

However, I do want the file to be OVERWRITTEN if it exists at the next login and I keep getting permission denied when trying to do so.

According to the notes, overwrite "yes" is the default.

"...it's turtles all the way down."
Steven E. Protter
Exalted Contributor

Re: ftpaccess overwrite - permission denied

This almost never has anything to do with ftpaccess.

It almost always has something to do with the user/group/permissions file ownership.

A logical look at that will spot the problem.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: ftpaccess overwrite - permission denied

Yes but I am changing ownership of the file via the ftpaccess file.
"...it's turtles all the way down."
G. Vrijhoeven
Honored Contributor

Re: ftpaccess overwrite - permission denied

Hi,

There is a section in the /etc/ftpd/ftpaccess file that concerns the overwrite:

# all the following default to "yes" for everybody
delete no guest,anonymous # delete permission?
overwrite no guest,anonymous # overwrite permission?
rename no guest,anonymous # rename permission?
chmod no anonymous # chmod permission?
umask no anonymous # umask permission?


You could try setting overwrite to yes.

HTH,

Gideon

Re: ftpaccess overwrite - permission denied

I tried setting the overwrite to yes, but this did not work.

I am playing with the permission settings now, but feel that with the changing of ownership (user and group) of the file, I am undoing what the overwrite is allowing.

Thanks.
"...it's turtles all the way down."
Sridhar Bhaskarla
Honored Contributor

Re: ftpaccess overwrite - permission denied

Hi,

I believe this is not going to work as long as the file doesn't have permissions for the user that is uploading file. This is what will happen in my view. Say you are uploading the file as "user" and you are changing ther ownership to "user1". ftpd spawned by root for the user "user" will first open the file as "user" and then will does fchown to "user1" due to the upload arguments.

In your overwrite case, the initial open itself will fail as the file is already owned by 'user1'. So, unless you put user in the same group as of user1 and change the permissions to "660" in your ftpaccess or give it "666" so that anyone can overwrite, it is not going to work. This is just my thought on how it works.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try