Results 1 to 2 of 2

Thread: chmod question

  1. #1
    Join Date
    May 2005
    Location
    Israel
    Beans
    176
    Distro
    Ubuntu 10.10 Maverick Meerkat

    chmod question

    Hi all.
    I need to change permission for directory and it´s subdirs. Running ´chmod -R a+x some_dir´ changing permissions for all of this directory´s content, including files. How can i change permissions for directory and subdirectories but leave a permissions for files unchanged?
    Registered Linux user #326684

  2. #2
    Join Date
    Nov 2004
    Beans
    2,614

    Re: chmod question

    You could use find:
    Code:
    find ./ -type d -print0 | xargs -0 chmod perms
    Or, if you don't want to grant execute on files (unless they already have it) use a+X.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •