
nspy
(usa Ubuntu)
Enviado em 24/11/2011 - 15:05h
Vou testar hje em casa mas faz sentido ...
For the NTFS and VFAT filesystems you can't use the chmod and chown command. You need to set the ownership or permissions of the entire filesystem in the mount command (or the /etc/fstab entries).
Here is an example. I have the "fuse" package and the "ntfs-3g" package installed. This allows read/write access. You could simply modeprobe "ntfs" and use "-t ntfs" instead.
Code:
sudo /sbin/modprobe fuse
jschiwal@hpamd64:~> sudo mount -t ntfs-3g /dev/sda1 /mnt/xp -o defaults,uid=jschiwal,dmask=007,fmask=117
jschiwal@hpamd64:~> ls -ld /mnt/xp
drwxrwx--- 1 jschiwal root 24576 Oct 21 02:59 /mnt/xp
The "uid=" option changes the ownership. The "dmask=" and "fmask=" options change the permissions of directories and files respectively. The numbers are octal and mask out (remove) the corresponding permission.
You can also use "gid=" to change the group. For both "uid=" and "gid=" you can use either the UID/GID number or the username/groupname.