Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've been using Ubuntu/Linux for a few years now but I'm still learning..

I've just updated to 12.10 after installing a Samsung 830 128GB SSD which has Windows and Ubuntu OS's dualboot on it. My old 500GB HDD (Data) is now NTFS with all my data on it (music, docs, videos etc) and I'd like to have this accessible/shareable in both OS's. I've decided to leave /home on my SSD but symlink to the Data drive. Before I do this I want to make sure Data automounts at startup (for Dropbox most importantly). If I edit my /etc/fstab/ to include:

# Data shared with windows
UUID=blablabla  /media/kim/Data  ntfs-3g  defaults,auto,uid=1000,gid=1000,umask=077  0 0

I get these permissions:

drwx------  1 kim  kim  4.0K Feb  4 23:31 Data/

This is the same when I mount the disk during a session by clicking on the disk in Unity.

But! If I look at the permissions of my documents when I "automount" it via fstab everything is executable:

-rwx------ 2 kim kim  13K Apr 25  2010 THE BEST OF THE BEST.doc*

I really want it to have the same permissions as when Ubuntu does the mounting:

-rw------- 2 kim kim  13K Apr 25  2010 THE BEST OF THE BEST.doc

Of course, I still want my videos to be executable right? So what are the correct permissions I should be using to do this (in my fstab)? Is there a way to find out what permissions Ubuntu gives the disk when it mounts so I can emulate them in my fstab?

Thanks in advance for any help. ;)

share|improve this question
add comment

1 Answer

Although its not exactly what I asked for in the question, I at least seem to have the correct file permissions by using dmask=027,fmask=137 as per:

ntfs/vfat = permissions are set at the time of mounting the partition with umask, dmask, and fmask and can not be changed with commands such as chown or chmod. I advise dmask=027,fmask=137 (if you use umask=000 all your files will be executable). More permissive options would be dmask=000,fmask=111. (from the fstab community page)

Now my directory permissions look like:

drwxr-x---  1 kim  kim  4.0K Feb 10 13:26 Data/

and the files look like:

-rw-r----- 2 kim kim  13K Apr 25  2010 THE BEST OF THE BEST.doc

(and the colours are all correct when using -ls).

Also: no, I don't need videos to be executable.. (right?) but directories should be (?).

If anyone else has better dmask,fmask or umask settings please let me know!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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