LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-12-2002, 12:41 PM   #16
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58

here is an idea you might consider to keep a little security going

create a group for users that will have write access to the partition

mount it with the new groups gid, set permission to none ( 770 ) for everyone else or read only ( 774 ) if you want
 
Old 11-12-2002, 12:43 PM   #17
newpenguin
Member
 
Registered: Sep 2002
Location: lahore pakistan
Distribution: slackware,redhat, FreeBSD,openbsd
Posts: 219

Rep: Reputation: 30
why dont you do just a simple thing
write line in /etc/fstab in a simple way then
chmod 744 /mnt/windows/.
 
Old 11-12-2002, 12:59 PM   #18
Bigun
Member
 
Registered: Aug 2002
Location: Hickville, TN
Distribution: Gentoo > current. Have used: Red Hat 7.3, 9, Gentoo 1.4
Posts: 400

Original Poster
Rep: Reputation: 30
I said I tried that in an ealier post, after it mounts it changes the permissions of the directory.

Also, David, your line you gave me to put into fstab doesn't work, it's not even listed in my mountpoints when I right click my desktop. Here, I'll just slap my fstab in here:

LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 iso9660 noauto,owner,kudzu,ro 0 0
/dev/hdd4 /mnt/zip100.0 auto noauto,owner,kudzu 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hda1 /mnt/win98 vfat exec,dev,suid,rw,conv=auto,uid=99,gid=99,umask=0 0 0
/dev/hda5 /mnt/media vfat exec,dev,suid,rw,conv=auto,uid=99,gid=99,umask=0 0 0


The last two lines used to look like this

/dev/hda1 /mnt/win98 vfat noauto,rw,users 0 0
/dev/hda5 /mnt/media vfat noauto,rw,users 0 0

So anyway, I have to head to work, I'' catch up on what was posted in 8 hours. C-ya!
 
Old 11-12-2002, 01:08 PM   #19
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
it will work, it has to

did you remount it

umount /mnt/win98 mount /mnt/win98
 
Old 11-12-2002, 01:09 PM   #20
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
here is mine

/dev/hda1 /win32 vfat exec,dev,suid,rw,conv=auto,uid=99,gid=503,umask=007 0 0

ls -l
drwxrwx--- 10 nobody vfatuser 16384 Nov 12 12:35 win32


sorry, I just don't believe that it could not work. There is something else going on here
 
Old 11-12-2002, 01:24 PM   #21
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
one thing you might be doing

mount /dev/hda1 /mnt/win98

instead of

mount /win98


if you are your not using fstab at all
 
Old 11-12-2002, 01:25 PM   #22
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
that is fine in linux newpenguin

he is using vfat on the partitions
 
Old 11-12-2002, 11:10 PM   #23
Bigun
Member
 
Registered: Aug 2002
Location: Hickville, TN
Distribution: Gentoo > current. Have used: Red Hat 7.3, 9, Gentoo 1.4
Posts: 400

Original Poster
Rep: Reputation: 30
I noticed that your line that you gave me differs in 3 places. uid, gid, and umask. Shoudl I set the gid and uid to my User ID and Group ID? Also, what is umask? Also, will this automount?
 
Old 11-12-2002, 11:17 PM   #24
Bigun
Member
 
Registered: Aug 2002
Location: Hickville, TN
Distribution: Gentoo > current. Have used: Red Hat 7.3, 9, Gentoo 1.4
Posts: 400

Original Poster
Rep: Reputation: 30
Question

Ok weird, I tried that and I noticed three things happened. 1) Now my two vfat partitions, when mounted, no longer show icons on the desktop. 2) The Owner and Group of the directories are instead of being me are "nobody". 3) Only root can unmount them. And I believe that they are also read-only.
 
Old 11-13-2002, 02:11 AM   #25
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
the one I posted that is my fstab is different because I have a group named vfatuser that's gid 503, my umask is like that to set permissions to 770 so only users I have in the vfatuser group can access it

the post I have with gid 99 and umask 0 will let anyone access it read and write, which is up to you.

you need to mount the partition as root. There should not be a reason to need to unmount it.

Last edited by DavidPhillips; 11-13-2002 at 02:12 AM.
 
Old 11-13-2002, 02:18 AM   #26
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
umask=0

anyone anywhere can read, write, and execute

the rw in fstab says mount it read write


These problem are due to the limitation of the fat32 filesystem, there is not much you can do about it other than use the uid and gid as shown
 
Old 11-13-2002, 02:20 AM   #27
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
using fstab the filesystems will be mounted at boot
 
Old 11-13-2002, 10:54 PM   #28
Bigun
Member
 
Registered: Aug 2002
Location: Hickville, TN
Distribution: Gentoo > current. Have used: Red Hat 7.3, 9, Gentoo 1.4
Posts: 400

Original Poster
Rep: Reputation: 30
I used it and it worked, and I think I figured out why the icons are not showing up on my desktop. Before my mounted partitions were treated like floppy drives and when they mounted, it showed up like one. Now it is treted like a normal part of the filesystem.
 
Old 11-14-2002, 07:45 PM   #29
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
right, that's it, the ones that show up in the menu are removable.

It really makes no sense to unmount a nonremovable drive. By mounting it at boot using fstab it's just like root mounting it.

You have the desired permissions applied and if for instance there are 25 users logged in, you would not want them to have to call everybody and say, "Hey I'm going to mount and use that drive now, is it all clear."

Last edited by DavidPhillips; 11-14-2002 at 07:48 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 12:10 PM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 12:56 PM
What scripts would you like to see? kittani Linux - Software 1 05-20-2004 03:26 AM
Scripts? zombie killa Linux - Software 5 05-29-2003 05:19 PM
scripts mdjames0 Linux - Newbie 4 08-02-2002 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:35 PM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Open Source Consulting | Domain Registration