Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
total 4
drwxr-xr-x 4 root root 4096 Nov 7 16:46 lab
[root@localhost Linux]# chgrp wheel lab/
chgrp: changing group of `lab/': Operation not permitted
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)
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.
[root@localhost ~]# cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/sda5 /mnt/D auto defaults 0 0
/dev/sda6 /mnt/E auto defaults 0 0
/dev/sda7 /mnt/F auto defaults 0 0
/dev/sda8 /mnt/G auto defaults 0 0
/dev/sda9 /mnt/H auto defaults 0 0
/dev/hdb /media/cdrecorder auto pamconsole,fscontext=system_u: object_r:removable_t,ro,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,fscontext=system_u: object_r:removable_t,exec,noauto,managed 0 0
Can you tell me what options do I need to add here in order to be able to write on a partition? In fact, i need write permissions only in one directory on a partition, but I think this doesn't matter... Of course, i would like to have permissions to write only on my user, not for everyone. Thank you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.