Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: chmod - mode of 'file.name' retained as 0755

  1. #1
    Join Date
    May 2010
    Beans
    30
    Distro
    Ubuntu 10.04 Lucid Lynx

    chmod - mode of 'file.name' retained as 0755

    OK, this is making me crazy. I can't seem to chmod a directory.

    Code:
    user@host:/usr/share$ sudo chmod -Rv o+r openbravo-erp
    mode of 'openbravo-erp' retained as 0755 (rwxr-xr-x)
    user@host:/usr/share$
    I've tried ls -L to see if it's a symbolic link but it doesn't seem to be. I've no idea why I can't change the permissions.

    Can anyone help?
    Last edited by aidanewen; October 11th, 2010 at 04:59 PM. Reason: typo

  2. #2
    Join Date
    Oct 2006
    Location
    Charlotte, North Carolina
    Beans
    199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: chmod - mode of 'file.name' retained as 0755

    It looks like it's working, but chmod is telling you the permissions you want are already set, so there's no need to change.

    "o+r" means give others read permission, and it appears they already have it.

    What are you trying to do? Maybe there's a piece I'm not seeing.

  3. #3
    Join Date
    May 2010
    Beans
    30
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: chmod - mode of 'file.name' retained as 0755

    Sorry I made a typo above, the permissions on the directory are drwxr-xr-x.

    (I've now corrected my original post...)

  4. #4
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: chmod - mode of 'file.name' retained as 0755

    Quote Originally Posted by aidanewen View Post
    Sorry I made a typo above, the permissions on the directory are drwxr-xr-x.

    (I've now corrected my original post...)
    What do you want the permissions to be ?

    Since others already have r access, +r will do nothing.

    You need to either

    chmod 750 (use numbers) or remove permissions you do not want

    chmod o-x

    BUT permissions on directories are not the same as permissions on files

    http://www.zzee.com/solutions/linux-permissions.shtml
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  5. #5
    Join Date
    May 2010
    Beans
    30
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: chmod - mode of 'file.name' retained as 0755

    I want others to have read permission:

    drwxr-xr-xr rather than drwxr-xr-x

  6. #6
    Join Date
    May 2010
    Beans
    30
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: chmod - mode of 'file.name' retained as 0755

    I'm trying to apply the change to all files and sub directories recursively (using the -R option).

  7. #7
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,704

    Re: chmod - mode of 'file.name' retained as 0755

    Quote Originally Posted by aidanewen View Post
    I want others to have read permission:

    drwxr-xr-xr rather than drwxr-xr-x
    drwxr-xr-x does give everyone read permissions. It's a directory and the user permissions are:
    rwx : full permissions to owner
    r-x : read and execute (enter the directory) to the group
    r-x : read and execute (enter the directory) to the world

    There cannot be another "r" after drwxr-xr-x because the description is already complete.

  8. #8
    Join Date
    May 2010
    Beans
    30
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: chmod - mode of 'file.name' retained as 0755

    OK, I get it. Only files can have that r - not directories (where an x means they can be opened right?).

    What about my recursive change of permissions. I want all the files in the directory readable by anyone, but I'm getting the following:

    Code:
      user@host:/usr/share$ sudo chmod -Rv o+r openbravo-erp/
    
    
    .....
    
    
      mode of `openbravo-erp/src/src/index.html' retained as 0755 (rwxr-xr-x)
      mode of `openbravo-erp/src/src/build.xml' retained as 0755 (rwxr-xr-x)
      mode of `openbravo-erp/src/src/ehcache.xml' retained as 0755 (rwxr-xr-x)
      mode of `openbravo-erp/src/src/buildAD.xml' retained as 0755 (rwxr-xr-x)
      user@host:/usr/share$
    It doesn't look like I've managed to change the permissions on my files either.
    Last edited by aidanewen; October 11th, 2010 at 05:23 PM. Reason: want to hide user and hostname

  9. #9
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,704

    Re: chmod - mode of 'file.name' retained as 0755

    But others already have read permissions. Look:
    mode of `openbravo-erp/src/src/index.html' retained as 0755 (rwxr-xr-x)
    Other users permissions are already r-x (read, not write, execute). That's why the existing mode was retained. I don't think you really want executable XML files, but that's another issue.

  10. #10
    Join Date
    May 2010
    Beans
    30
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: chmod - mode of 'file.name' retained as 0755

    OK, I think I'm starting to understand this properly - The hyphens don't separate users, groups and others, they represent missing permissions?

    So if I did a chmod o-r on one of those xml files I'd get rwxr-x--x?

    I think I get it.

    Thanks loads for your help.

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •