LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Thread Tools
Old 08-06-2002, 06:23 PM   #1
bynaar
Member
 
Registered: Jul 2002
Posts: 141
Thanked: 0
Exclamation write permissions / ownership


[Log in to get rid of this advertisement]
hello !

I know this is a stupid question.

I can't write anything on my /mnt/hda7 that holds a fat32 partition, where I keep my downloaded stuff.

How should I configure it so an ordinary user (not root)
is able to write data on that partition ?

I know that I must change some kind of permissions / stuff

please help !
bynaar is offline     Reply With Quote
Old 08-06-2002, 07:16 PM   #2
Excalibur
LQ Addict
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Slackware
Posts: 1,180
Thanked: 0
Try the unmounting the partition.

chmod 777 /mnt

or

chmod 775 /mnt; chgrp users /mnt

Then remount the partition.

The first command above should open it to the everybody, unrestricted, if it is mounted read/write and not read-only. The second would make it read/write/execute by the group called "users", and read/execute by the world.

Unless /mnt/hda7 is the mount point and not /mnt, you should consider making a directory like /mnt/shared or /mnt/vfat, or something. The /mnt directory usually has other subdirs like /mnt/cdrom, /mnt/floppy, and /mnt/hd that could be used by other commands.

Last edited by Excalibur; 08-06-2002 at 07:17 PM..
Excalibur is offline     Reply With Quote
Old 08-07-2002, 10:13 AM   #3
bynaar
Member
 
Registered: Jul 2002
Posts: 141
Thanked: 0

Original Poster
Sorry !

None of the suggestions worked, no succes . .

Have I forgotten something else ?

If I change owner/permission on /mnt, then all the subfolders will inherit the /mnt settings right ?

To clear it out, hda7 is my fat32 partition & this is monuted in the /mnt folder.
bynaar is offline     Reply With Quote
Old 08-07-2002, 12:58 PM   #4
Excalibur
LQ Addict
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Slackware
Posts: 1,180
Thanked: 0
From the console prompt type

mount

It should respond with all of the mounted devices. Make sure it is mounted as "rw" for read/write like your other partitions. Also, I think you need to be sure to unmount and remount.

As for inheritance, it is a fat32 partition you stated and fat32 does not have any concept of permissions to begin with. So I would think it would inherit the permissions of the mount point when it is mounted. You can use the "ls -l" command to display the permissions of the files after it is mounted to see what is assigned. Note: That was a lowercase "L" on the command option.

Let me know the results.
Excalibur is offline     Reply With Quote
Old 08-07-2002, 02:30 PM   #5
bynaar
Member
 
Registered: Jul 2002
Posts: 141
Thanked: 0

Original Poster
ok. Here are a dump from my terminal

bash-2.05a$ mount
/dev/hda6 on / type ext2 (rw)
/dev/hda7 on /mnt/hda7 type vfat (rw)
/dev/hda8 on /mnt/hda8 type vfat (rw)
/dev/hda9 on /mnt/hda9 type vfat (rw)
/dev/hda10 on /mnt/hda10 type vfat (rw)
/dev/hdb6 on /mnt/hdb6 type vfat (rw)
/dev/hdb8 on /mnt/hdb8 type vfat (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /proc type proc (rw)
bash-2.05a$
bash-2.05a$ cd /mnt
bash-2.05a$
bash-2.05a$ ls -l
total 70
drwsrwsrwx 2 root root 1024 Mar 16 08:34 cdrom
drwxr-xr-x 2 root root 1024 Mar 16 08:34 floppy
drwxr-xr-x 6 root root 16384 Jan 1 1970 hda10
drwxr-xr-x 5 root root 4096 Jan 1 1970 hda7
drwxr-xr-x 4 root root 4096 Jan 1 1970 hda8
drwxr-xr-x 4 root root 8192 Jan 1 1970 hda9
drwxr-xr-x 10 root root 32768 Jan 1 1970 hdb6
drwxr-xr-x 5 root root 4096 Jan 1 1970 hdb8
bash-2.05a$
bynaar is offline     Reply With Quote
Old 08-07-2002, 03:38 PM   #6
Excalibur
LQ Addict
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Slackware
Posts: 1,180
Thanked: 0
Your mount point is /mnt/hda7 and it is device /dev/hda7. The permissions above would need to be done to /mnt/hda7 and the others that you desire to allow the write permissions.

/mnt/hda7 currently has read/write/exe for root, read/exe only for the group root, and read/exe only for the world. Use "chmod 777 /mnt/hda7" for example and remount the partition. Repeat as desired for the other partitions.

All of the mounts indicate "rw" for read/write.
Excalibur is offline     Reply With Quote
Old 08-07-2002, 04:02 PM   #7
bynaar
Member
 
Registered: Jul 2002
Posts: 141
Thanked: 0

Original Poster
Unhappy

still not working . . .

I tried umount /dev/hda7 and /mnt/hda7

then the chmod stuff . .

then mount /dev/hda7 and mnt/hda7

If it is to any help, here is the fstab file.

/dev/hdb5 swap swap defaults 0 0
/dev/hda6 / ext2 defaults 1 1
/dev/hda7 /mnt/hda7 vfat defaults 1 0
/dev/hda8 /mnt/hda8 vfat defaults 1 0
/dev/hda9 /mnt/hda9 vfat defaults 1 0
/dev/hda10 /mnt/hda10 vfat defaults 1 0
/dev/hdb6 /mnt/hdb6 vfat defaults 1 0
/dev/hdb8 /mnt/hdb8 vfat defaults 1 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro,user 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
bynaar is offline     Reply With Quote
Old 08-07-2002, 04:15 PM   #8
Excalibur
LQ Addict
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Slackware
Posts: 1,180
Thanked: 0
Can you write to the partition as root?
Excalibur is offline     Reply With Quote
Old 08-07-2002, 04:23 PM   #9
bynaar
Member
 
Registered: Jul 2002
Posts: 141
Thanked: 0

Original Poster
Yes !
bynaar is offline     Reply With Quote
Old 08-07-2002, 04:45 PM   #10
Excalibur
LQ Addict
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Slackware
Posts: 1,180
Thanked: 0
I can only recommend at this point to use the "ls -l" command and verify that the chmod command worked as expected.
Excalibur is offline     Reply With Quote
Old 08-07-2002, 04:53 PM   #11
bynaar
Member
 
Registered: Jul 2002
Posts: 141
Thanked: 0

Original Poster
bash-2.05a$ ls -l
total 67
drwxr-xr-x 2 root bin 2048 Jun 23 21:25 bin
drwxr-xr-x 2 root root 1024 Jun 23 21:30 boot
drwxr-xr-x 14 root root 37888 Aug 7 21:44 dev
drwxr-xr-x 16 root root 2048 Aug 7 22:20 etc
drwxr-xr-x 4 root root 1024 Jun 23 19:47 home
drwxr-xr-x 3 root root 2048 Jun 26 21:21 lib
drwxr-xr-x 2 root root 12288 Jun 23 17:34 lost+found
drwxrwxrwx 10 root users 1024 Aug 6 23:47 mnt
drwxr-xr-x 5 root root 1024 Aug 3 23:42 opt
drwxr-xr-x 3 root root 1024 Jul 24 00:04 packs
dr-xr-xr-x 68 root root 0 Aug 7 2002 proc
drwx--x--- 29 root root 1024 Aug 7 22:22 root
drwxr-xr-x 2 root bin 2048 Jun 26 21:19 sbin
drwxrwxrwt 17 root root 1024 Aug 7 22:48 tmp
drwxr-xr-x 17 root root 1024 Jun 5 00:38 usr
drwxr-xr-x 11 root root 1024 May 18 21:07 var
bash-2.05a$ ls -l /mnt
total 70
drwsrwsrwx 2 root root 1024 Mar 16 08:34 cdrom
drwxr-xr-x 2 root root 1024 Mar 16 08:34 floppy
drwxr-xr-x 6 root root 16384 Jan 1 1970 hda10
drwxr-xr-x 5 root root 4096 Jan 1 1970 hda7
drwxr-xr-x 4 root root 4096 Jan 1 1970 hda8
drwxr-xr-x 4 root root 8192 Jan 1 1970 hda9
drwxr-xr-x 10 root root 32768 Jan 1 1970 hdb6
drwxr-xr-x 5 root root 4096 Jan 1 1970 hdb8
bash-2.05a$ ls -l /mnt/hda7
total 3336
drwxr-xr-x 2 root root 4096 Aug 6 23:03 Recycled
drwxr-xr-x 5 root root 4096 Aug 6 22:15 download
bash-2.05a$
bynaar is offline     Reply With Quote
Old 08-07-2002, 05:21 PM   #12
Excalibur
LQ Addict
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Slackware
Posts: 1,180
Thanked: 0
OK. In the listing here the mount point /mnt/hda7 is still at 755. It has not been changed to 777. Please use "chmod 777 /mnt/hda7" as root. Perhaps you executed it as a user and not root. Then umount and mount the partition.
Excalibur is offline     Reply With Quote
Old 08-07-2002, 05:36 PM   #13
bynaar
Member
 
Registered: Jul 2002
Posts: 141
Thanked: 0

Original Poster
Question

Thanks for trying to help !
I'm getting to tired for this . .

Password:
bash-2.05a# umount /mnt/hda7
bash-2.05a# mount
/dev/hda6 on / type ext2 (rw)
/dev/hda8 on /mnt/hda8 type vfat (rw)
/dev/hda9 on /mnt/hda9 type vfat (rw)
/dev/hda10 on /mnt/hda10 type vfat (rw)
/dev/hdb6 on /mnt/hdb6 type vfat (rw)
/dev/hdb8 on /mnt/hdb8 type vfat (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /proc type proc (rw)
bash-2.05a# chmod 777 /mnt/hda7
bash-2.05a# ls -l /mnt
total 67
drwsrwsrwx 2 root root 1024 Mar 16 08:34 cdrom
drwxr-xr-x 2 root root 1024 Mar 16 08:34 floppy
drwxr-xr-x 6 root root 16384 Jan 1 1970 hda10
drwxrwxrwx 2 root root 1024 Aug 6 23:47 hda7 ######
drwxr-xr-x 4 root root 4096 Jan 1 1970 hda8
drwxr-xr-x 4 root root 8192 Jan 1 1970 hda9
drwxr-xr-x 10 root root 32768 Jan 1 1970 hdb6
drwxr-xr-x 5 root root 4096 Jan 1 1970 hdb8
bash-2.05a# mount /mnt/hda7
bash-2.05a# ls -l /mnt
total 70
drwsrwsrwx 2 root root 1024 Mar 16 08:34 cdrom
drwxr-xr-x 2 root root 1024 Mar 16 08:34 floppy
drwxr-xr-x 6 root root 16384 Jan 1 1970 hda10
drwxr-xr-x 5 root root 4096 Jan 1 1970 hda7 #####
drwxr-xr-x 4 root root 4096 Jan 1 1970 hda8
drwxr-xr-x 4 root root 8192 Jan 1 1970 hda9
drwxr-xr-x 10 root root 32768 Jan 1 1970 hdb6
drwxr-xr-x 5 root root 4096 Jan 1 1970 hdb8
bash-2.05a# strange . . .
bynaar is offline     Reply With Quote
Old 08-07-2002, 06:39 PM   #14
kroniq
LQ Newbie
 
Registered: Jun 2002
Posts: 20
Thanked: 0
This probably isn't the best way, but anyway...

mount /dev/hda7 /mnt/hda7 -o id=your-login,gid=users

or have something like this for it in /etc/fstab

/dev/hda7 /mnt/hda7 vfat user,uid=your-login,gid=users 1 0
kroniq is offline     Reply With Quote
Old 08-07-2002, 08:45 PM   #15
Excalibur
LQ Addict
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Slackware
Posts: 1,180
Thanked: 0
I think I might have figured out what is going on. Since the type of the partition is vfat, the mount command is setting the permissions and owner to the default of the user that is mounting it. In this case, root. The default umask for root is set to 022 in the /etc/profile file. Hence the permissions are set to 755 on the mount point. I would think that by adding the option to the fstab to change the umask might be as simple.

/dev/hda7 /mnt/hda7 vfat defaults,umask=000 1 0

The umask is a bit mask used to set the actual permission bits. In this case it should set them to 777 because the mask is set to all zeroes. After making the change remount the partition.

This is the type of case where I can learn as well. Because I never use vfat partitions on production machines, I have never had to deal with it before. I was only able to test it using a floppy disk, but it worked.
Excalibur is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing permissions and ownership on many files and folders Cinematography Linux - General 4 08-01-2005 04:20 AM
Permissions & Ownership Really screwed slacard Other *NIX 1 04-03-2005 01:36 AM
File permissions and ownership all screwed up Haiyadragon Linux - General 6 09-20-2004 02:09 PM
Compile Package Permissions Ownership Changes PDock Linux - General 0 08-17-2004 08:52 AM
Question about ownership/permissions infornography Linux - Newbie 7 07-28-2004 06:57 AM


All times are GMT -5. The time now is 07:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration