Results 1 to 8 of 8

Thread: After installing Ubuntu 12.04, cannot chmod file to be exectable on separate disk

  1. #1
    Join Date
    Aug 2009
    Beans
    35

    After installing Ubuntu 12.04, cannot chmod file to be exectable on separate disk

    Hi there,

    After I performed fresh install of Ubuntu 12.04 on sda drive, I cannot change perms on one of the files to make it executable.

    I own the file as a user, i ran chmod as user or root with either +x, or u+x, or 700. Command runs, but file is still rw, not rwx.

    I even tried to right click on it using GUI, then click the box for the "executable". It marks it as executable, and then immediately removes it by itself.


    Anyone ran into this before?

  2. #2
    Join Date
    Oct 2011
    Location
    ZZ9 Plural Z Alpha
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: After installing Ubuntu 12.04, cannot chmod file to be exectable on separate disk

    Re-own it as your user

    Code:
    sudo chown username file
    Then try changing the permissions:

    Code:
    chmod u+rwx file
    Make sure you're logged in as your user when running chmod.

  3. #3
    Join Date
    Aug 2009
    Beans
    35

    Re: After installing Ubuntu 12.04, cannot chmod file to be exectable on separate disk

    Already tried all that, do not work.

  4. #4
    Join Date
    Dec 2009
    Beans
    5,453

    Re: After installing Ubuntu 12.04, cannot chmod file to be exectable on separate disk

    Is the file in question sitting on an NTFS or FAT32 partition? You can't chown or chmod such a file.

  5. #5
    Join Date
    Aug 2009
    Beans
    35

    Re: After installing Ubuntu 12.04, cannot chmod file to be exectable on separate disk

    I was able to before, than I was running Ubuntu 9.04.

  6. #6
    Join Date
    Aug 2009
    Beans
    35

    Re: After installing Ubuntu 12.04, cannot chmod file to be exectable on separate disk

    I am thinking - 12.04 mounts it differently than 9.04. Can someone confirm/deny that

  7. #7
    Join Date
    Oct 2011
    Location
    ZZ9 Plural Z Alpha
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: After installing Ubuntu 12.04, cannot chmod file to be exectable on separate disk

    I don't think so, but your question is a little unclear.

    I know you'd tried some of the commands earlier- did you try them again in the sequence I gave?

  8. #8
    Join Date
    Dec 2009
    Beans
    5,453

    Re: After installing Ubuntu 12.04, cannot chmod file to be exectable on separate disk

    There was a change to the default mount parameters for NTFS partitions around maybe 10.04 or so - I can't remember exactly when. Before then all files would be 777 now all files are 600.

    If this is an internal partition you can reproduce the way it was done back then by creating your own entry in fstab. Use the following template as a guide:
    Code:
    UUID=DA9056C19056A3B3 /media/Win ntfs defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0
    This will mount the NTFS partition with you as owner and all folders and files will have permissions of 777.

    To find the correct UUID number for you partition run the following command:
    Code:
    sudo blkid -c /dev/null
    Create the mount point:
    Code:
    sudo mkdir /media/Win
    If you have mounted the partition manually unmount it first then run the following command to mount it again with the new line in fstab:
    Code:
    sudo mount -a
    Note: If you only want it to be accessible and executable to you then change the umask to 077. this will make all files and folders 700:
    Code:
    UUID=DA9056C19056A3B3 /media/Win ntfs defaults,nls=utf8,umask=077,uid=1000,windows_names 0 0
    Last edited by Morbius1; September 26th, 2012 at 02:08 PM.

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
  •