Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • can you explain this in more detail? I will only be saving textfiles in that directory, so why do I need execute permissions? If the whole world has both write and execute permissions, this seems crazy. That's why I wanted only write and not execute permissions. What am I missing? Commented Aug 27, 2015 at 20:02
  • 2
    There must be execute permissions on all the directories /in/path/to/TEMPFILES/somefile as otherwise the program will not have permission to traverse through to somefile; the execute bit on a directory controls whether or not a path traversal is allowed. Another option would be to restrict the directory permissions to only that of the webserver, or a group containing the necessary users, if the o+rwx bits are problematic. Commented Aug 27, 2015 at 20:10
  • @thrig, you should elaborate on the s bit. Commented Aug 27, 2015 at 20:12
  • chmod a+X TEMPFILES is safer it will only add execute bits where needed (only for directories and files that already have it, for user). Commented Aug 27, 2015 at 21:40
  • Directory permissions are about the directory not the files in it. r read: allow reading of file-name from within the directory, x execute : allow access to files in directory, w write: allow adding and removing of files in directory. Commented Aug 27, 2015 at 21:42