aru Posted April 29, 2003 Report Share Posted April 29, 2003 It wasn't obvious to me Well done aru, clever stuff. I never knew you had to mount first, before making changes, good tip. Thanks! :D But the fact is that this stuff is explained at the very top of the mount man page: [...] The standard form of the mount command, is mount -t type device dir This tells the kernel to attach the file system found on device (which is of type type) at the directory dir. The previous contents (if any) and owner and mode of dir become invis ible, and as long as this file system remains mounted, the pathname dir refers to the root of the file system on device. [...] :mrgreen: Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted April 29, 2003 Author Report Share Posted April 29, 2003 Thanks aru, truly awesome. Only goes to show that in linux there's always a way. Thanks again for clearing that up. Quote Link to comment Share on other sites More sharing options...
Guest fubar::chi Posted April 29, 2003 Report Share Posted April 29, 2003 don't you just add user to an fstab entry to make it mountable (and hence readable) by a user? mine /dev/hda5 /mnt/stuff reiserfs user,notail,noauto,exec 1 2 /dev/hda7 /mnt/stuff2 reiserfs user,notail,noauto,exec 1 2 /dev/hda6 /mnt/suse reiserfs user,notail,noauto,exec 1 2 and bvc: I thought that umask trick was only for windows. Quote Link to comment Share on other sites More sharing options...
aru Posted April 29, 2003 Report Share Posted April 29, 2003 don't you just add userNo. Here we don't need to allow our users to mount that partition because it should be mounted on boot as it is not a removable drive, so is useless to allow users to mount something that is already mounted. We (pmpatrick) had a permission problem, not a mounting problem that's why we didn't need to modify the /etc/fstab file. The "user" flag to mount means (man mount): user Allow an ordinary user to mount the file system. The name of the mounting user is written to mtab so that he can unmount the file system again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid). Which is not what we want, do we? Also you have to agree that neither noexec, nosuid, nor nodev are interesting in our context (allowing user write access to a partition). You need the "user" flag because you use the "noauto" one, thus providing your users the capability to mount those partitions explicitly, but I don't see how can that be related to our permissions problem and bvc: I thought that umask trick was only for windows. It is useful (the umask=0) for vfat partitions because there aren't permissions, but it is also useful if you want to set a particular permission mask in a given partition different of that provided by the current proccess (usually the current bash session). Ofcourse that doesn't modify the permissions of the existing files, but those of the future ones ;) [edited: added the comment about the "noauto" flag in your example] Quote Link to comment Share on other sites More sharing options...
Guest fubar::chi Posted April 30, 2003 Report Share Posted April 30, 2003 aru: oh yeah i forgot about that. I never have my computer mount any thing at boot. I always do it manually. Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted April 30, 2003 Report Share Posted April 30, 2003 aru, this begs another question. Why is his mounting acting different from the "norm"? After installing Mandrake, I've made new partitions as reiserfs and mounted them using fstab without having to fool around with permissions on the mounting folder. What's up with him? He even made a new folder to try it out. Wonder if he has read/write to make folders under mount as a non-root user and maybe he did that? Quote Link to comment Share on other sites More sharing options...
aru Posted April 30, 2003 Report Share Posted April 30, 2003 aru, this begs another question. Why is his mounting acting different from the "norm"? After installing Mandrake, I've made new partitions as reiserfs and mounted them using fstab without having to fool around with permissions on the mounting folder. What's up with him? He even made a new folder to try it out. Wonder if he has read/write to make folders under mount as a non-root user and maybe he did that? Him? who? pmpatrick or fubar::chi? I'll assume that you are talking about pmppatrick. :) His mounting is acting exactly as yours and as the norm. You made partitions the same as he did. The problem wasn't there. His problem was that he couldn't write in his brand new partition as "normal user" because he hadn't the right permissions to do it, and that is exactly what is meant to be. That wasn't a mounting problem, was a permission problem while trying to write something where normal users aren't allowed. You have the same "problem" ;) ; lets take your /usr partition as an example: you can't write as "normal user" in there unless you give the right permissions (w+o) to the /usr dir, can you? If normal users were allowed by default to write in any directory (root dir of a partition or not) will be at least very unsafe. That's all what the problem was about. He couldn't solve the problem when he changed the permissions of the mounting point because he did that while the partition was unmounted thus not affecting the root directory of the filesystem he mounted later (see the "man mount" quote I posted few posts above about what really happens when you mount something somewhere) I guess that the default permissions on a new partition (its root dir) are set accordingly to the default permission bitmask (but this is only a guess) Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted May 1, 2003 Report Share Posted May 1, 2003 You know? You are absolutely right. Now that I recall, after I created a new reiserfs partition (/share), I chowned the partition to make my local user the owner. A different approach but same result (unless you are another user :) ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.