Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'am trying to access a remote Directory via SFTP. ls in the parent dir says that where the d for directory should be, there is an l. Manpage of chmod says something about "mandatory locking", but there's no hint how to remove the lock.

lrwxrwxrwx    0 1000     1100         193B Mar 17  2011 JWF4nwWqm85-TnsJ57hObvO7rrjOJmmlRSfd4ohb65Ct30

I haven't got any root-priviledges, nor any shell access (except SFTP) on that server. The file was created with the exact same user as I am using right now.

How to access that directory / remove that locked flag?


Error message accessing that file is Couldn't stat remote file: No such file or directory. But ls says it is there.

share|improve this question

If this output is taken from ls -l, the first l in the output means this is a symbolic link not a locked file. Under bash, you will get also something

lrwxrwxrwx  1 khaled khaled     7 2012-01-23 12:01 temp -> /tmp/temp

This tells you that the file temp in current directory is a symlink to a file in /tmp.

share|improve this answer
Ah ok, thanks. And how to copy that symlink via SFTP without getting an error? – k_wave Jan 23 '12 at 11:26
Did you post the exact error message? – Khaled Jan 23 '12 at 11:42
Edited the post and added the error message – k_wave Jan 23 '12 at 11:44
@k_wave: It seems that the symlink is invalid (the original file has been removed). – Khaled Jan 23 '12 at 11:52
Of course it is invalid. That symlink was copied to the server, but the file it is pointing to was not. My question is how to download ONLY the symlink (not it's destination)? – k_wave Jan 23 '12 at 12:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.