Ask for help: change permissions of the second hard drive
I have two 160G hard drives. On the first one, I have two operating system: windows XP(pro) and Linux Red Hat. The second hard drive is only available in XP or root under Linux. as a common user in Linux, the second HD is only readable but not writable. I had tried to login as root and change the permission by chmod. But it didn't change anything.
For example: (/DATA is the folder of second HD) ls -l /DATA total 288 drwxr-xr-x 2 root root 32768 Nov 28 23:07 ancova drwxr-xr-x 9 root root 32768 Nov 29 13:03 multi drwxr-xr-x 9 root root 32768 Oct 11 13:41 oldbackupUCD drwxr-xr-x 11 root root 32768 Nov 15 09:25 paper drwxr-xr-x 3 root root 32768 Nov 23 16:24 projects drwxr-xr-x 2 root root 32768 Sep 29 13:09 Recycled drwxr-xr-x 3 root root 32768 Sep 28 12:49 System Volume Information drwxr-xr-x 4 root root 32768 Oct 1 17:20 teaching -rwxr-xr-x 1 root root 8 Dec 17 19:38 test.txt When I type: chmod o+w /DATA/test.txt ls -l /DATA ............ -rwxr-xr-x 1 root root 8 Dec 17 19:38 test.txt Nothing changed ??? Any suggestion? I googled for a while and it seems that if I change /etc/fstab, it might be helpful. But I don't know how to change it. Here is my current /etc/fstab: This file is edited by fstab-sync - see 'man fstab-sync' for details LABEL=/1 / ext3 defaults 1 1 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 LABEL=SWAP-sda3 swap swap defaults 0 0 /dev/hdb /media/cdrom auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0 /dev/hda /media/cdrecorder auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0 |
whatever you are currently mounting to /DATA it seems to be a fat filesystem.
to understand /etc/fstab type 'man fstab' to understand the diffrerent parts of fstab read tha man mount page |
The permissions and ownership of ntfs and vfat (fat32) partitions are set when the device is mounted. They are set for the entire partition. You can use the "umask" option to affect the permissions of both files and directories. Or you can use "fmask" to set the file permissions and "dmask" to set the directory permissions. For globally writable partitions, it is a good idea not to enable the execute bit on files, but this bit has a different purpose for directories. It allows directories to be entered.
You can also change the ownership and group ownership with the "uid" and "gid" options respectively. As mentioned in the above post, the "man mount" man page contains more information. |
all this above all applies, but:
I can't see any entry for /DATA is fstab, do you? if it is a vfat partition you caould use something like this in /etc/fstab: Code:
/dev/hd[abcd][1-9] /DATA vfat defaults,auto,rw,uid=root,gid=users,umask=0117 0 0 this will mount the partition automatically on boot as rw-rw---- root users into /DATA |
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
Please continue here |
All times are GMT -5. The time now is 08:41 PM. |