0

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!

2
  • 2
    If it's a mounted FAT/NTFS disk, you can't change permissions.
    – adamax
    Apr 23, 2011 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.) Apr 23, 2011 at 12:44

2 Answers 2

3

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

3

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.

1
  • 1
    The ntfs-3g driver supports mapping of POSIX permissions to NTFS ACLs. Apr 23, 2011 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .