LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Non-root user has read-only access to fat-c partition (https://www.linuxquestions.org/questions/slackware-14/non-root-user-has-read-only-access-to-fat-c-partition-554227/)

Ook 05-15-2007 10:07 PM

Non-root user has read-only access to fat-c partition
 
I have a fat32 partition mounted at /fat-c. My non-root users seem to have only read-only access to it, whereas root does. What am I missing - it's a fat32 partition, so you can't assign access rights to it. How do I give write access to non-root users? Slackware 11, 2.6.12.1 kernel.

Alien_Hominid 05-15-2007 10:12 PM

Maybe with this line in fstab:

/dev/sda1 /mnt/sda1 vfat auto,users,suid,dev,exec 0 0

folkenfanel 05-15-2007 10:59 PM

From my fstab
 
/dev/hda1 /disc/win vfat auto,rw,umask=000 1 0

Ook 05-16-2007 08:06 PM

Quote:

/dev/sda1 /mnt/sda1 vfat auto,users,suid,dev,exec 0 0
/dev/hda1 /disc/win vfat auto,rw,umask=000 1 0
/dev/hda1 /fat-c vfat auto,user,exec,rw 0 0
None of these work. I seem to be missing something. I created a user and made them a member of every group, and that user still has no write access to it.

folkenfanel 05-16-2007 11:04 PM

Hi again
 
Hi!

I will explain this a bit more clearly:

----------------------------------------------
d | mp | fs | options
----------------------------------------------
/dev/hda1 /disc/win vfat auto,rw,umask=000 1 0

d=your device and partition
mp=your mount point
fs=your filesystem
options=options ;)

That comes from "mount" e.g.

mount -t reiserfs /dev/hda6 /disc/disc6

where "reiserfs" is the filesystem, "/dev/hda6" is the partition and "/disc/disc6" is a mount point, this is, a folder anywhere inside my root folder. That "mount point" has to be created before I attempt to mount something using it.

Now let's get it...

folkenfanel 05-16-2007 11:11 PM

...we are still here
 
Let's do it!

You said you had:
/dev/sda1 /mnt/sda1 vfat auto,users,suid,dev,exec 0 0
/dev/hda1 /disc/win vfat auto,rw,umask=000 1 0
/dev/hda1 /fat-c vfat auto,user,exec,rw 0 0

The one in the middle works for me, (as a matter of fact it has worked that way since 2003) and it could work for you as well, BUT you have to have in mind that you have to redirect that to an existing mount point in YOUR system. As you said you HAD a "/fat-c" folder, I bet the fstab line for you would be:

/dev/hda1 /fat-c vfat auto,rw,umask=000 1 0

You can also use the former, (with "/disc/win" or whatever you like), by creating the folder beforehand

mkdir /disc/win

(or whatever name you might want to use)

May the Source be with you!

TheLateJC 05-16-2007 11:19 PM

Quote:

Originally Posted by Ook
I created a user and made them a member of every group

It would be best to undo that at the earliest opportunity.

rworkman 05-17-2007 03:54 PM

http://slackwiki.org/Windows_Partitions

folkenfanel 05-17-2007 10:06 PM

rworkman has a point
 
about umask (read that article). I use Windows mainly for gaming. (this means PristonTale) I almost never use MSIE. I don't have many programs installed - only what I still can not run with Wine-Cedega (I am also a CrossOver tester).

Since I am still completing some big downloads here, I haven't used Windows here for weeks. Using plainly umask there -could- be a security risk.

Ook 05-23-2007 11:30 PM

Quote:

Originally Posted by folkenfanel
.....
/dev/hda1 /fat-c vfat auto,rw,umask=000 1 0

.....

I have /fat-c, it's where I've always mounted my fat partition. If I include unmask=000, I get:

FAT: Unrecognized mount option "unmask=000"

If I remove the unmask=000, it mounts the partition - but read only for non-root users. This is the exact line I use:

/dev/hda1 /fat-c vfat auto,rw,unmask=000 1 0

And it gives the above error and does not mount the partition. It does, however, recognize fmask and dmask, just not unmask. Go figure?

Tux-Slack 05-24-2007 02:31 AM

It's umask not unmask
I solved this in another way
I created a group win with GID 103
added myself to that group
and edited fstab like this:
Code:

/dev/hda1        /win        ntfs-3g    defaults,gid=103,dmask=1227,fmask=1117        1  2
Ok it's for a NTFS partition.
But you should do the same, add gid=103 to fstab.
ignore the dmask and fmask in my fstab as you won't need it

rworkman 05-24-2007 09:28 AM

All of this is detailed in the SlackWiki page I linked... :/

Ook 05-25-2007 08:49 AM

Quote:

Originally Posted by rworkman
All of this is detailed in the SlackWiki page I linked... :/

I know, I read it, good stuff. My problem was using UNMASK instead of UMASK LOL. My bad :eek:


All times are GMT -5. The time now is 03:33 PM.