LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vfat partition & user log in problem (https://www.linuxquestions.org/questions/linux-newbie-8/vfat-partition-and-user-log-in-problem-441640/)

windycity_linux 05-04-2006 01:46 PM

vfat partition & user log in problem
 
I just repartition my laptop HD with PartitionMagic and dual booting with WinXP and RedHat ES 4.0. What I want to do is create a "/" "root" partition with 29GB, a swap partition 1GB and 3GB vfat partition so I can share file between the OS. What is the best way to partition with VFAT file system? (ie. the mount point). I tried select "/tmp" or "/home" or /usr as the mount point but Disk Druid did not allow me to do so with the following error message "the mount point must be on linux file system".

so I selected "/home/mahal" as the mount point for vfat partition and later created user mahal but when I try to log in as user "mahal" the system automatically logs me out immidiately due to some permission problem. I can log in as root without any problem. So what am i doing wrong here? what are the restriction on vfat partition mount point?

thanks for your help.

drkstr 05-04-2006 02:18 PM

it's not a good idea to create the home directory of a user as a vfat partition. It is better just to mount it under /mnt/fat and allow rw access to this drive to users (or a specific user). If you really really want the home directory a vfat partition you can still do it, you just need to set the permissions correctly.

to create a mount point for vfat with rw access:
Code:

#mkdir /mnt/fat
#chown /mnt/fat mahal

then in /etc/fstab add:
Code:

/dev/hda<x>  /mnt/fat  vfat  users,defaults,umask=000  0 0
where <x> is the correct partition #. This will give all users rw access to the drive, if you want to limit access to just a single user, you need to set the umask permissions appropriately.

You can then mount the drive with 'mount /mnt/fat'. This will also be automaticly mounted at boot. To make home directory for hamal (not recommended) then change /mnt/fat to /home/hamal.

regards,
...drkstr

**edit**
if you do make the vfat the home dir, I strongly recomend changing the umask permissions to not allow access to the entier "users" group and restrict it the that single user: umask=077

note: umask permissions are the oposite of regular octal permissions, think of it like 777 - <permissions you want set>
**edit**


All times are GMT -5. The time now is 08:45 AM.