FTP and access rights

Hello all,
I am currently writing an application that besides other thing ,ftps files from remote machines (running linux and solaris). My problem is this: i am connecting to remote machines as a user other than root and i have found that there is a possibility that i will encounter folders with no 'x' access rights, meaning that ftp from these folders fail. Can I somehow declare a user 'special' and give him root priviliges when ftping? (something similar to sudo with other commands).

Thank you.

Do you mean something like /etc/sudoers?

With that file I think it's possible to give users extended privilages just for one kind of operation.

Im not sure, just an idea. Try man sudoers.

No, it's not possible. FTP has no way to allow re-authentication, or to start and interact with external programs, neither on the server or client side.

You could try issuing a get with the absolute path of the file, if known, from outside the directory. That way you don't need the execute permission set. Explanation: for directories, the permission bits work a bit differently:

  • Write means the permission to create new directory entries (eg. new files or sub-directories).
  • Read means the permission to list the contents of the directory.
  • eXecute means the permission to change into the directory.

So depending on the implementation used, it might be possible to list the files in a directory and download them without changing into it.

Thank you very much pludi, it is very clear now.
In ftp I am using the absolute path (from root directory) but still files that are under a dir with no X permissions are not being ftp'ed.