Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How to 'chmod' on an NTFS partition?

I have just started using Ubuntu and I have my hard drive set up with an Ubuntu partition, a Windows 7 partition and a much larger Storage partition where I keep most of my files.

I have been doing some programming and have been putting a.out into a folder in the Storage partition. When I try to launch it in Bash I got a permission denied error. I then did a sudo chmod +x a.out, but this did not give any feedback so I tried to launch a.out again and got permission denied. I tried using the GUI to change a.out to executable but when I checked the box it unchecks right away.

I did some googling and it seems that the partition itself needs to be given permission to execute. So I did sudo chmod +x Storage and then I did ls -l and got:

drwx------ 1 jared jared 4096 2011-09-17 21:03 Storage

When I go back to change a.out it still wont change.

This is the line from /proc/mounts for the file system:

/dev/sda3 /media/Storage fuseblk   rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0

I'm sure there is something about permissions I am misunderstanding so if some one could point me in the right direction it would be greatly appreciated.

Thanks, Jared

share|improve this question

marked as duplicate by enzotib, Marco Ceppi Sep 20 '11 at 12:45

This question was marked as an exact duplicate of an existing question.

Could you edit your question to include the line from /proc/mounts corresponding to the file system you're having trouble with? – James Henstridge Sep 20 '11 at 4:16
Just did. Is that what you are referring to? – Jared Sep 20 '11 at 4:22
I had been wondering whether the file system had been mounted with the noexec flag, or whether you were using a file system that didn't support the needed permission bits. I'm guessing that you're using NTFS here though, and I'm not sure how it handles the execute bit. – James Henstridge Sep 20 '11 at 6:14

Bash scripts don't have to be executable, you just have to specify what to run them with. For example:

bash ./script

Linux permissions (aka chmod/chown) only work on Linux file systems. They won't work on NTFS or FAT32.

share|improve this answer
Too bad he obviously wants to execute a binary file... ;-) – con-f-use Sep 20 '11 at 9:16

Windows file systems (notably fat32 and ntfs) and some others do not have a right management like their linux counterparts. But even it that weren't so, sudo chmod +x Storge would not do much as it is just a folder in the file system hierarchy and folders are already executable. You'd need the recurse option chmod -R folder to set the permissions for all files in that folder. But again that won't work here either because there are not permissions to be set.

However you can tell your system to mount the storage partition in a way that allows executing. For example my /etc/fstab entry for my windows partition looks like this:

# Excerpt from /etc/fstab
UUID=7258CB9858CB598D /media/win ntfs rw,auto,user,exec,nls=utf8,umask=003,gid=46,uid=1000    0   2

Note in particular the umask and the exec option. gid and uid tell mount to which user the partition belongs to.

More information in these questions:

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.