[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



Greg

> -----Original Message-----
&gt; From: ale-bounces at ale.org [<a  rel="nofollow" href="mailto:ale-bounces";>mailto:ale-bounces</a> at ale.org]On Behalf Of Dow
&gt; Hurst
&gt; Sent: Wednesday, June 30, 2004 3:45 PM
&gt; To: Atlanta Linux Enthusiasts
&gt; Subject: Re: [ale] Permission hell question
&gt;
&gt;
&gt; I'm glad your setting the record straight on this but I think it may be
&gt; distribution specific or device type specific.  I have had on my
&gt; RH9 box the
&gt; user option in /etc/fstab and also the device to have write
&gt; permissions for
&gt; all but could not write to a CF card thru a card reader once
&gt; mounted.  Once I
&gt; did it as root then the write worked.  It may be that RH9 on this box has
&gt; another security setting preventing it and/or the USB card reader
&gt; might not be
&gt; interpreted the same way as a zip since different code is mounting it.
&gt; Anyway, my thought is that the safest way to guarantee the method
&gt; to work is
&gt; to just su to root to mount and copy the files, especially for
&gt; new users.  I
&gt; may be quoting also too much IRIX specific NFS mount rules.  The
&gt; underlying
&gt; mount point permissions should play into what a mounted
&gt; filesystem is capable
&gt; of, so if not, then Linux is different than IRIX there.  Sorry
&gt; for the wrong
&gt; info!  I get different scenarios for success between RH and SuSE
&gt; and IRIX for
&gt; all this stuff.  The only way I can guarantee that a mount and
&gt; write will work
&gt; will be to do it all as root.  I don't like it and it is probably more a
&gt; mixture of security settings, permissions, and the /etc/fstab
&gt; options than
&gt; anything else between distros that botches things up.  In SuSE on
&gt; login you
&gt; can get permissions on devices changed on the fly to the UID
&gt; logging in.  On
&gt; RH that doesn't seem to happen.  IRIX had it's own daemon,
&gt; mediad, to manage
&gt; removeable media.
&gt; Dow
&gt;
&gt;
&gt; Geoffrey wrote:
&gt; &gt; Dow Hurst wrote:
&gt; &gt;
&gt; &gt;&gt; I was reading thru all the posts on this and you have basically a
&gt; &gt;&gt; couple of problems working together.
&gt; &gt;&gt;
&gt; &gt;&gt; Vfat doesn't have permissions like normal Linux filesystems.  So you
&gt; &gt;&gt; can't change the permissions on files from the vfat default of anyone
&gt; &gt;&gt; reading and writing any files.
&gt; &gt;&gt;
&gt; &gt;&gt; Your device file permissions were initially set so only root could
&gt; &gt;&gt; access the device.  That way your normal user id wouldn't be able to
&gt; &gt;&gt; write to the drive.
&gt; &gt;&gt;
&gt; &gt;&gt; So, if you have to use the zip as a transfer between Win/DOS and
&gt; &gt;&gt; Linux, then you should keep the filesystem as is, and just leave your
&gt; &gt;&gt; device file that represents the zip drive as writeable for root.  Su
&gt; &gt;&gt; to root to mount, transfer files, and unmount the zip.
&gt; &gt;
&gt; &gt;
&gt; &gt; You really don't have to do this.  I mount my memory stick which has
&gt; &gt; vfat fs by any user.  Relevant entry in /etc/fstab:
&gt; &gt;
&gt; &gt; /dev/sda1 /mnt/memstick vfat noauto,user,exec 0 0
&gt; &gt;
&gt; &gt; The 'user' option permits any user to mount the file system.
&gt; &gt;
&gt; &gt; Once it's mounted, I can create files as well as directories on
&gt; &gt; /mnt/memstick as the user who mounted the filesystem.
&gt; &gt;
&gt; &gt;&gt; If you move to the new 2.6 kernel then all the mount and umount stuff
&gt; &gt;&gt; goes away for removeable devices.  Plus, with permissions on the
&gt; &gt;&gt; devices set correctly by the kernel for removeable devices you can
&gt; &gt;&gt; work as a user.  I need to read up on that last statement but SuSE 9.1
&gt; &gt;&gt; was a dream for the use of CD's and floppies when I was trying it out.
&gt; &gt;&gt;
&gt; &gt;&gt; Using mtools is a nice idea since it is designed to work with vfat.
&gt; &gt;&gt; The unix cp -p command won't work like you'd expect since you don't
&gt; &gt;&gt; have ownership or permissions per se under vfat.  I believe the kernel
&gt; &gt;&gt; just calls all the files and directories as owned by root unless you
&gt; &gt;&gt; have it mounted as nobody.
&gt; &gt;
&gt; &gt;
&gt; &gt; Not exactly.  If you can create a file on the mounted file
&gt; system, it is
&gt; &gt; created as owned by the user who created it:
&gt; &gt;
&gt; &gt; rhws/mnt/memstick&gt; ls -lart
&gt; &gt; total 52
&gt; &gt; -r-xr-xr-x    1 esoteric users           0 Jul 16  2003 memstick.ind
&gt; &gt; drwxr-xr-x    6 root     root         4096 Jun 29 07:45 ..
&gt; &gt; drwxr-xr-x    2 esoteric users       16384 Jun 30 13:48 foo
&gt; &gt; drwxr-xr-x    4 esoteric users       16384 Jun 30 13:48 .
&gt; &gt;
&gt; &gt;&gt; The underlying mount point permissions are very important to match up
&gt; &gt;&gt; with what your filesystem has that will be mounted.  You can't see
&gt; &gt;&gt; those permissions on the mount point unless the filesystem isn't
&gt; &gt;&gt; mounted yet on that mount point.
&gt; &gt;
&gt; &gt;
&gt; &gt; This isn't accurate either, sorry Dow. :)
&gt; &gt;
&gt; &gt; /mnt/memstick on my box was 755 and I can mount it and created/delete
&gt; &gt; files or directories.  As root, I changed the perms of /mnt/memstick to
&gt; &gt; 700.  I'm still able to mount the filesystem as well as create/delete
&gt; &gt; files and directories.
&gt; &gt;
&gt; &gt; Note the following:
&gt; &gt;
&gt; &gt; root at rhws/home/esoteric&gt; ls -ld /mnt/memstick
&gt; &gt; drwx------    2 root     root         4096 May 12 13:59 /mnt/memstick
&gt; &gt; root at rhws/home/esoteric&gt; exit
&gt; &gt; exit
&gt; &gt; rhws/home/esoteric&gt; mount /mnt/memstick
&gt; &gt; rhws/home/esoteric&gt; ls -ld /mnt/memstick
&gt; &gt; drwxr-xr-x    3 esoteric users       16384 Dec 31  1969 /mnt/memstick
&gt; &gt;
&gt; &gt;&gt; This bites people using NFS, such as me, when you have the mount point
&gt; &gt;&gt; with 0700 permissions but expect to have 0755 on the mounted
&gt; &gt;&gt; filesystem.  The mounted filesystem's permissions hide and overlay the
&gt; &gt;&gt; underlying mount point's permissions when mounted so you'd have to
&gt; &gt;&gt; unmount to check and see what the values were.
&gt; &gt;
&gt; &gt;
&gt; &gt; I've not tried this for NFS, so I'm not sure what happens there.
&gt; &gt;
&gt;
&gt; --
&gt; __________________________________________________________
&gt; Dow Hurst                  Office: 770-499-3428            *
&gt; Systems Support Specialist    Fax: 770-423-6744            *
&gt; 1000 Chastain Rd. Bldg. 12                                 *
&gt; Chemistry Department SC428  Email:   dhurst at kennesaw.edu   *
&gt; Kennesaw State University         Dow.Hurst at mindspring.com *
&gt; Kennesaw, GA 30144                                         *
&gt; ************************************************************
&gt; This message (including any attachments) contains          *
&gt; confidential information intended for a specific individual*
&gt; and purpose, and is protected by law.  If you are not the  *
&gt; intended recipient, you should delete this message and are *
&gt; hereby notified that any disclosure, copying, distribution *
&gt; of this message, or the taking of any action based on it,  *
&gt; is strictly prohibited.                                    *
&gt; ************************************************************
&gt;
&gt; _______________________________________________
&gt; Ale mailing list
&gt; Ale at ale.org
&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
&gt;
&gt;


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00708" href="msg00708.html">[ale] Permission hell question</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00690" href="msg00690.html">[ale] Permission hell question</a></strong>
<ul><li><em>From:</em> dhurst at kennesaw.edu (Dow Hurst)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00702.html">[ale] Permission hell question</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00704.html">[ale] Permission hell question</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00711.html">[ale] Permission hell question</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00708.html">[ale] Permission hell question</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00703"><strong>Date</strong></a></li>
<li><a href="threads.html#00703"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>