Error: set attrs for /www.example.com/index.html: permission denied

Come here to discuss FileZilla and FTP in general

Moderator: Project members

Post Reply
Message
Author
owkaye
500 Command not understood
Posts: 3
Joined: 2009-04-30 03:24
First name: Owkaye
Last name: Go

Error: set attrs for /www.example.com/index.html: permission denied

#1 Post by owkaye » 2018-04-10 17:32

Hello all,

My non-root Filezilla users are getting errors like this when they SFTP upload a file that already exists on the server *and* they do not own the existing file:
Error: set attrs for /www.example.com/index.html: permission denied
Apparently this error has something to do with the failure to change or set permissions?

If the user actually owns the corresponding server file his upload never displays this error. When he uploads a new file he never sees this error either. So this error seems to occur only when the user does NOT own the server file he is trying to overwrite.

In fact the existing file gets overwritten even though this error appears. However, the original owner of the server file still owns it after it has been overwritten. I suspect that this is why the error is generated: Filezilla tries to reset the owner of the file after it is overwritten, but it fails with the specified error message.

This situation came about because I gave several users SFTP access to a single website's document root folder and its subfolders. They work as a team to maintain the website, but they complain frequently about seeing this error. It would be nice if they never had to see it again!

So ... I am looking for a way to avoid or suppress this particular error message. Can it be suppressed or removed, perhaps by editing a Filezilla configuration file, or some other way?

Or if there's a specific way to reconfigure my Ubuntu Linux 14.04.2 server to prevent this error in the first place, please tell me how -- or point me to a reference that explains how -- because I have yet to find a suitable solution to this problem online, and yes I have Googled it for many hours already, with no luck so far.

DrLightman
550 Permission denied
Posts: 24
Joined: 2014-07-04 08:05

Re: Error: set attrs for /www.example.com/index.html: permission denied

#2 Post by DrLightman » 2020-12-12 03:39

*bump* because I'm interested too.

What is the action/command Filezilla is trying to perform after the chmtime? Apparently that next action is the one triggering the "permission denied".

From there, I can look for a solution. My sftp user is in the group of the file being overwritten, the file gets overwritten successfully because it has group write permission, still the red error message of the op appears, so I'm not sure what's going on.

User avatar
botg
Site Admin
Posts: 35491
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Error: set attrs for /www.example.com/index.html: permission denied

#3 Post by botg » 2020-12-14 09:04

Part of the upload is replicating permissions (the file mode bits), something that can only be changed by the file owner.

Easiest workaround is to ensure that the one uploading is the file owner.

Stevec5088
504 Command not implemented
Posts: 9
Joined: 2009-03-05 22:25
First name: Steve
Last name: Cosner

Re: Error: set attrs for /www.example.com/index.html: permission denied

#4 Post by Stevec5088 » 2021-10-14 16:51

I found a workaround: first delete the file on the server, then upload the new copy.

Apparently group write access allows the member of the group to delete the file. Then new file is uploaded, with a different owner, and FileZilla can set the timestamp. I did need to manually set the group write access on the new file, though.

User avatar
boco
Contributor
Posts: 26899
Joined: 2006-05-01 03:28
Location: Germany

Re: Error: set attrs for /www.example.com/index.html: permission denied

#5 Post by boco » 2021-10-14 19:22

Newly created files on the server should be assigned either the configured values in the FTP server software, or they inherit owner and UMASK from the directory /parent itself.
*NIX permission in FTP servers is often very limited, as it is not FTP (but custom) functionality.
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Please do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

Post Reply