Re: Permissions

by John.ksi(at)webplus.net

 Date:  Thu, 7 Oct 1999 08:32 EDT
 To:  hwg-servers(at)hwg.org
  todo: View Thread, Original

> I am FTPing to a Unix server. In one particular directory, if I try to
> upload a file over top of an old one it gives 553 permission denied.
> However, I can delete the file on the server and then re-upload the file
> with no trouble. What's up with the permissions here? What permissions
> should I be using? (Files in the directory must be creatable and
> writeable by a cgi script.)

Sounds like permissions on the file is more restricted than
permissions on the directory.  If so, then it's very conceivable
that while you're able to add or delete entries (files) from the
directory, you're still denied the ability to modify (or overwrite)
the files.  (Restricted) permissions on the files are often set at
the time the file is ftp'd to the directory.   So under unix, it's
entirely possible to prohibit you from overwritting the file you
just uploaded, yet allow you to delete and re-upload.  I'm not
saying this makes a whole lotta sense, I'm just saying it's
perfectly do-able.

I suspect your ftp-ing into an area other people can ftp to too?
If so, the sysadmin was probably trying to prevent somebody from
overwriting somebody else's file.  True, this can be gotten around
with a delete/re-upload, but at least accidental overwrites are
avoided which may have been the sysadmin's only goal.

If *you* are the sysadmin, then I would refer you to the "man"
pages for "umask" and for "ftpd" which sets the initial
permissions for ftp'd files - perhaps with the "-u" option.

-John

HWG: hwg-servers mailing list archives, maintained by Webmasters @ IWA