My application on the server wants to copy a file from a remote directory mounted by sshfs to a local directory. The application code:

shutil.copy('/data/somdir/somefile.txt','/var/www/App/localfolder' )

The permissions of /data is as follows:

drwxrwxrwx   1   1027 root  4096 May  6 10:16 data

So every user(including Apache) should able to access the folder, but in the logfile I get:

IOError: [Errno 13] Permission denied

Some edits and updates on my question:

I set allow_other when mounting via SSHFS, and all the directories along the path to the source file have permissions of at least 755.So any use has read access to it.

  • How about the permissions of files inside /data? May 15, 2016 at 4:19
  • first of all, are you copying whole folder /data ?
    – Rahul
    May 15, 2016 at 5:18
  • no, jsut some specific files in /data/somedir. but all these folders have r+x permissions.
    – Alex
    May 15, 2016 at 12:36

1 Answer 1


mount with option allow_other.

If you rely on these permissions being enforced, add the option default_permissions.

  • default_permissions saved me.
    – Alex
    May 17, 2016 at 2:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .