Linux file permissions

admin's Avatar

admin

19 Mar, 2012 09:16 PM

After upgrading our Cascade installation to 6.10.9 and moving to a new server this morning, when files are published locally they are being created with 750 (rwx/rx/nothing) file permissions. I can fix the permissions from the command line but I'm wondering what needs to be changed so Cascade will export files with the correct permissions to begin with. I tried changing the cascade user's umask, but that didn't appear to make a difference.

Thanks,

.: Jared

  1. 1 Posted by Bradley Wagner on 19 Mar, 2012 09:30 PM

    Bradley Wagner's Avatar
    • What version were you previously using?
    • What are the permissions of the target directory to which the files are being published?
    • What are the expected permissions?
  2. 2 Posted by admin on 19 Mar, 2012 10:14 PM

    admin's Avatar
    • We were previously on 6.10.7
    • Target directory permissions are 755
    • I would expect the outputted directories to be 755 and files to be at least 644 so they're world-readable
  3. 3 Posted by Bradley Wagner on 19 Mar, 2012 11:08 PM

    Bradley Wagner's Avatar

    Are you using a Filesystem Transport or doing a publish locally using FTP or SFTP?

  4. 4 Posted by Jared Ocker on 20 Mar, 2012 05:51 PM

    Jared Ocker's Avatar

    Hi Bradley -- They're using Filesystem Transport.

    ~~~
      Jared Ocker
      Systems Administrator
      George Fox University
      503.554.2572

  5. 5 Posted by Bradley Wagner on 20 Mar, 2012 05:54 PM

    Bradley Wagner's Avatar

    Thanks for the update. We haven't changed the way Cascade writes files to the file system between 6.10.7 and 6.10.9.

    • Did you move Cascade to an entirely new server environment? Same OS?
    • Which user is running the Cascade process
    • What is the umask of that user?
    • Which user/group owns the folder to which Cascade is publishing?
  6. 6 Posted by Jared Ocker on 20 Mar, 2012 06:50 PM

    Jared Ocker's Avatar

    - Yep, I moved Cascade to a completely new server. Same OS (Ubuntu 10.04
    LTS), just needed to switch from 32-bit to 64-bit so I could increase the
    Java heap above 2GB.
    - I have a user named "cascade" running the Cascade process
    - umask is currently set to 0022
    - cascade user owns the directory where Cascade is publishing. As a
    temporary workaround, I've changed the permissions of all files to have the
    www-data group so they can be accessed through Apache

    ~~~
      Jared Ocker
      Systems Administrator
      George Fox University
      503.554.2572

  7. 7 Posted by Bradley Wagner on 20 Mar, 2012 07:37 PM

    Bradley Wagner's Avatar

    So to summarize:

    • Your target directory has 755 permissions and is owned by cascade:www-data
    • Your cascade user's umask is 0022
    • Given this, it should create new files with 644 and new directories with 755
    • Files are being created with 750

    Some additional questions:

    • What permissions are sub-directories within the publish directory being created with?
    • Can you try create a file with touch test in the base publish directory as the Cascade user, check the permissions, and attach the output of ls -al <publish_dir>?
    • Can you try create a folder with mkdir test2 in the base publish directory as the Cascade user, check the permissions, and attach the output of ls -al <publish_dir>?
    • Can you include the output of umask from the terminal for the 'cascade' user to ensure you have the correct umask set?
  8. 8 Posted by Jared Ocker on 20 Mar, 2012 09:32 PM

    Jared Ocker's Avatar

    Hi Bradley -- We actually just got this working. Apparently Cascade was
    still holding onto the default umask and not reading the new one I set
    (which would make sense, I suppose). We just restarted Cascade, deleted
    the old files and re-published, and the file/directory permissions are all
    fixed. Thanks for your help in troubleshooting this.

    ~~~
      Jared Ocker
      Systems Administrator
      George Fox University
      503.554.2572

  9. 9 Posted by Bradley Wagner on 20 Mar, 2012 10:08 PM

    Bradley Wagner's Avatar

    Not a problem. Glad to hear you got it working!

  10. Bradley Wagner closed this discussion on 20 Mar, 2012 10:08 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac