LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Users couldnt get Write permission from root. (https://www.linuxquestions.org/questions/red-hat-31/users-couldnt-get-write-permission-from-root-189734/)

novkhan 06-04-2004 02:28 PM

Users couldnt get Write permission from root.
 
Goodday.

OS: Redhat 9

Harddisk : FAT
Need help becoz i couldnt really get users to write data into my FAT formatted harddisk.
i have aready mounted hdb5 (which is the FAT harddisk) to a folder call "windows"

Only Root have RWX permission on FAT windows.
[root@localhost mnt]# ls -l windows
total 4
drwxr-xr-x 2 root root 4096 Jun 8 00:58 Recycled

I want to allow user to have Write permission on the harddisk as well.
[root@localhost mnt]# chmod u=rwx windows

[root@localhost mnt]# ls -l windows
total 4
drwxr-xr-x 2 root root 4096 Jun 8 00:58 Recycled

But it doesnt work

I tried to change ownership to a user call novkhan but it doesnt work as well!

[root@localhost mnt]# chown novkhan windows
chown: changing ownership of `windows': Operation not permitted
[root@localhost mnt]# ls -l windows
total 4
drwxr-xr-x 2 root root 4096 Jun 8 00:58 Recycled

I hope to achieve WRX for all users on my FAT Harddisk.

drwxr-wxr-wxr

please help !
Thankyou!

kevinatkins 06-04-2004 02:54 PM

hi,

this is quite a common question.

you need to set up the mount parameters for your windows partition in your /etc/fstab file.

the following is an extract from my fstab file which works -

Quote:

/dev/hda1 /windows/C vfat users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0
to edit your /etc/fstab file, you'll need root privileges, and remember to make a backup copy first, just in case..
you should then be able to write to your windows partition..

novkhan 06-04-2004 09:35 PM

Quote:

Originally posted by kevinatkins
hi,

this is quite a common question.

you need to set up the mount parameters for your windows partition in your /etc/fstab file.

the following is an extract from my fstab file which works -



to edit your /etc/fstab file, you'll need root privileges, and remember to make a backup copy first, just in case..
you should then be able to write to your windows partition..

i open /etc/fstab with gedit

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
LABEL=/home /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
/dev/hda9 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/sda1 /mnt/thumbdrive vfat user,noauto,umask=0 0 0
/dev/hda5 /mnt/windows/c vfat users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0

i placed hdb5 which is the /dev/hda5 .... but it doesnt work?

[root@localhost root]# cd /mnt
[root@localhost mnt]# chmod 777 windows
chmod: changing permissions of `windows' (requested: 0777, actual: 0755): Operation not permitted

i tried this few options as well but in vain!

/dev/hda5 /mnt/windows vfat users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0

/dev/hda5 /mnt/windows/C vfat users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0


darthtux 06-04-2004 10:01 PM

To let a user do whatever the umask needs to be 000

darthtux 06-04-2004 10:05 PM

BTW, I don't know if you know this or not, but when you make changes to /etc/fstab you have to run

mount -a

for the file to be re-read

novkhan 06-05-2004 02:25 PM

Quote:

Originally posted by darthtux
BTW, I don't know if you know this or not, but when you make changes to /etc/fstab you have to run

mount -a

for the file to be re-read

thanks i didnt knew abt this .
Any way i change it to

/dev/hda5 /mnt/windows vfat users,gid=users,umask=000,iocharset=iso8859-1,code=437 0 0

save it. I ran the command
# mount /dev/hdb5 /mnt/windows
# mount -a

I still couldnt assign write permission to user

tweezerz 06-24-2004 06:16 PM

I'm having the same problem. Let me know if you found a solution.

Thanks,

jacky 06-25-2004 03:34 AM

try to modify your /etc/fstab like this

/dev/hda1 /windows/C vfat noauto,users,umask=000 0 0

any user can mount the /windows/C .

tweezerz 06-25-2004 01:53 PM

I see where my problem is different. I was using smb instead of vfat. Instead of using umask you have to use dmask and fmask:

//winmachine/windir /mnt/windir smb noauto,credentials=/etc/samba/smb.info,workgroup=workgroup,owner,dmask=777,fmask=777 0 0

We're on an internal network where security is a very minor issue.

I appreciate the help,

Z


All times are GMT -5. The time now is 10:39 AM.