I can write to Windows partitions only as root
When I work in linux, i have a few directories where i usually write, so I would like to have write permissions only in those directories. So, I thought to change the group ownership of those directories to wheel (wheel includes my user) and give write permissions to all users in wheel. Can you tell me if this is possible? Because I get this message:
Code:
[root@localhost Linux]# ls -l |
You have to set a different umask for the mount point of the partition.
|
If your Windows partiton is NTFS formatted then currently there isn't a safe way of writing to it anyway for root or any user.
(unless they've made some leaps and bounds in this area since i last checked) |
Oh... and as okmyx said, it can be a little tricky to write on NTFS partition... vfat are OK.
|
How do I set the umask?
My partition is FAT32, i know it's not good to write on NTFS partitions. So the problem is the umask. How do I set a different umask?
Code:
[root@localhost ~]# umask -S |
it's something you set either on the mount command (in case you are mounting manually) or set on /etc/fstab for that given mount point.
Check the mount options for vfat and fat partitions on the man page: Code:
man mount |
Thank you. It was really nice from you, other people would answer "RTFM". :)
|
Hey... we've been through this as well. ;-)
|
Just so that it is clear. The group ownership for a fat32 partiiton is set when the partition is mounted. In other words, not just the umask. Also, consider using the fmask and dmask parameters instead. This allows you to not allow execution of files, but be able to enter directories. The e"x"ecution bit is different for directories. You could also use the "uid=" option, to make yourself the owner of the partition (once it is mounted).
|
The linux 2.6 kernel series has stabel NTFS write support.
Because of the permissions in NTFS even if you mount it as read write you still may not be able to write to it. <-- i have had this issue before. to be able to mount any parttion as a user then you need to change some options in your fstab. NTFS has its own permissions that im not sure if linux can modify. I have always just moved things from and to that kind of parttion with root and never tried to change permissions for a folder so that a user could use it but im sure it would need to be done in windows not in linux for it to work. Of course im probably wrong but im not 100% sure if NTFS permissions are build into the driver in linux. |
My /etc/fstab looks like this:
Code:
[root@localhost ~]# cat /etc/fstab |
put "umask=YOURMASK", on the target line
|
for instance:
Code:
/dev/sda5 /mnt/D vfat umask=0 0 0 |
modify it lyke your want.
each partitioin can be mount everywhere you want, with the rigth you want to attribute them. |
All times are GMT -5. The time now is 01:43 PM. |