Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to change user permissions of lots of files but I can not! I use this code:

administrator@unknown:~$ sudo chmod 700 *  -R

or

administrator@unknown:~$ sudo chmod 700 myfile -R

I want to change permission of file that no one except me can see file and directories! It seems to be correct and no error appears but permission of file won't change!

  • Files created by windows 7,So default permission is 777, and owner is root!

Thanks for any help or suggestion!

share|improve this question

migrated from stackoverflow.com Apr 23 '11 at 10:19

This question came from our site for professional and enthusiast programmers.

2  
If it's a mounted FAT/NTFS disk, you can't change permissions. –  adamax Apr 23 '11 at 10:01
    
@adamax: The ntfs-3g driver supports mapping of POSIX permissions to NTFS ACLs. (Not sure if the feature is already in Ubuntu, though.) –  grawity Apr 23 '11 at 12:44

2 Answers 2

up vote 3 down vote accepted

If its NTFS or FAT you can tweak the mount options of the entire mountpoint:

Ntfs:

rw,user,auto,fmask=0177,dmask=0077,uid=1000

FAT:

user,auto,fmask=0177,dmask=0077,uid=1000

See the howto here

share|improve this answer

The permissions on a file do not influence its listing in a directory. Instead, change the the permissions of the directory with

sudo chmod 700 .

Also, make sure your file system drivers support UNIX permissions. ext*, XFS, etc. do, but not FAT and only some NTFS implementations.

share|improve this answer
1  
The ntfs-3g driver supports mapping of POSIX permissions to NTFS ACLs. –  grawity Apr 23 '11 at 12:43

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.