Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3k views
in Java FTP by (200 points)
Hello again,

So, in SFTP it looks like only the owner can change a file's modtime to something other than the current time (at least on the servers we're using). Is there a way to map the logged in user's name to their uid for use in SSHFTPClient.changeOwner()? For the time being, I'll create a temporary file when I first connect and grab the uid from that file, but I was hoping for a more general mechanism for cases where I might need to change the owner to a user other than the one that has logged in.

Thanks,
Kevin

1 Answer

0 votes
by (162k points)
Depending on the operating system you could also try executing a remote command, e.g. on Unix systems 'id -u' will give you the userid.

Categories

...