Fwd: Re: [SLE] renaming home directory
---------- Forwarded Message ----------
Subject: Re: [SLE] renaming home directory
Date: Thu, 02 Jan 2003 13:37:13 -0200
From: Adagilson B B da Silva
On Thursday 02 January 2003 16:42, Dylan wrote:
---------- Forwarded Message ----------
Subject: Re: [SLE] renaming home directory Date: Thu, 02 Jan 2003 13:37:13 -0200 From: Adagilson B B da Silva
To: Dylan THANK YOU VERY MUCH, MY FRIEND.
:)
a.
PS - Could I use chown adagilson /windows/G to gain permission to write do this windows partition? because "root" is the owner but I didn't achieve, using Kuser, to set permission for user adagilson. Also, I tried chmod +w /windows/G, as root, but nothing happens :( The same for chmod 777 /windows/G.
Erm, no, for this you need to edit the permissions in the /etc/fstab file. I'm not sure of the exact details because I have no Windows drives to deal with, but looking at man fstab and man mount will give you pointers - reading the docs is very much the right way to learn these things. You want to look at the umask option in the mount man-page (under mount options for fat) (arround line 600) btw: please respond to list posts on-list, so followups (like this) can be seen by all. Dylan -- "Sweet moderation Heart of this nation Desert us not We are between the wars" Billy Bragg
On Thu, 2003-01-02 at 17:48, Dylan wrote:
PS - Could I use chown adagilson /windows/G to gain permission to write do this windows partition? because "root" is the owner but I didn't achieve, using Kuser, to set permission for user adagilson. Also, I tried chmod +w /windows/G, as root, but nothing happens :( The same for chmod 777 /windows/G.
Erm, no, for this you need to edit the permissions in the /etc/fstab file. I'm not sure of the exact details because I have no Windows drives to deal with, but looking at man fstab and man mount will give you pointers - reading the docs is very much the right way to learn these things.
My /etc/fstab drives looks like this for my Windows drive (there is more in this file, I just copy/pasted the relevant section): =-=-=-=-=-= /dev/hda1 /windows/C ntfs noauto,user 0 0 /dev/hdb1 /windows/D vfat noauto,user 0 0 /dev/hdb2 /windows/E vfat noauto,user 0 0 /dev/hdb3 /windows/F vfat noauto,user 0 0 -=-=-=-=-=- Note that the ntfs file system should be used as a readonly system for now. With these fstab lines, I can mount (either manually or by a Desktop icon) these drives and read/write as any user on my system. C.
On Thursday 02 January 2003 8:48 am, Dylan wrote:
On Thursday 02 January 2003 16:42, Dylan wrote:
---------- Forwarded Message ---------- From: Adagilson B B da Silva
PS - Could I use chown adagilson /windows/G to gain permission to write do this windows partition? because "root" is the owner but I didn't achieve, using Kuser, to set permission for user adagilson. Also, I tried chmod +w /windows/G, as root, but nothing happens :( The same for chmod 777 /windows/G.
Erm, no, for this you need to edit the permissions in the /etc/fstab file. I'm not sure of the exact details because I have no Windows drives to deal with, but looking at man fstab and man mount will give you pointers - reading the docs is very much the right way to learn these things.
You want to look at the umask option in the mount man-page (under mount options for fat) (arround line 600)
btw: please respond to list posts on-list, so followups (like this) can be seen by all.
also, since Dylan doesn't have "windows" partitions, followups to the list allow for folks like myself to respond [and since this machine is set for "dual boot" and does have drives up through G:, it is trivial for me to copy my fstab for both of you to "learn" from] That said, here is the relevant portion of my /etc/fstab file [note, it probably will wrap] /dev/hde1 /windows/C vfat users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0 /dev/hde5 /windows/D vfat users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0 /dev/hde6 /windows/E vfat users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0 /dev/hdg5 /windows/F vfat users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0 /dev/hdh5 /windows/G vfat users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0 yup, it did -- breaking it down "in general" you get /dev/hd<x><y> -- the actual "device" containing the dos partition "x" and "y" are a letter and digit respectively /windows/<x> -- the target "mount point" -- this is where you (the end user) will "see" this partition under linux's "all encompassing file system" [similar to current windows's notion of "my computer", which encompasses all the drives: hard, floppy or otherwise] vfat -- the partition type [no need to joke about windows being "bloated" when they themselves call their file system "FAT" :) ] users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0 -- this is "the magic line" that you are interested in. further breakdown: "users" -- means ANYONE can mount & umount the partition "gid=users" -- means the "group" membership should be "users", not "root"; this by itself should allow you to see the contents [and possibly write to the drive] "umask=0002" -- this helps ensure you have the ability to read/write the drive, no matter who you are [unless for some strange reason you are not a "user"] "iocharset=iso8859-1" and "code=437" -- this has to do with how any "text" data is interpreted; may not be needed if you are in the U.S.A. (your system will already be using this charset and codepage) 0 -- [first zero] should this partition be backed up by dump? unless you actually use "dump", you probably don't need to worry about this field 0 -- [second zero] fsck on which "pass"? [zero means no check is done at all] This is equivalent to the DOS "scandisk on boot" setting for windows SuSE did all of this "by default" when installed from a system that already had dos/windows partitions -- I didn't type any of this myself. One important thing to remember is that "user" is not the same as "users" -- in the singular form, only the user who "mounts" the drive can "umount" it [without either "user" or "users", only "root" can do the deed]. Of course, if you are the only "user" of the system [other than 'root'], this is kind of a moot point :) Also note that the "options" portion [that long segment beginning with 'users,'] does NOT have the option "noauto" included -- this enables the drives to be mounted /at boot time/, meaning they are already available for all users by the time you log in. [earlier distro's included "noauto", forcing "someone" to mount the drive(s) once they logged in...] <sudden realization> I forgot to point out that "fat" filesystems don't have a concept of "owner" -- the entire partition becomes "owned" by the user that mounted it </realization>. Because of this, (auto) mounting by the root user tends to make it "owned" by root, and "normal people" cannot/should not read and write files "owned by" root. If you have "noauto" as an option, along with "user" or "users", then the user who mounts the partition becomes "the owner", and can read/write the files with ease. This CAN get annoying if you mount the partition as one user, log off [without umounting it] and logging on as another user [other than root] -- the second user usually has problems with files on that partition, and cannot "umount" the drive to re-mount it as the new owner [hence the inclusion of "gid=" and "users" plural -- setting the gid allows for everyone in the group "users" access at a "group" level, while "users" plural as an option allows the second user to "umount" the drive mounted by the first.]
The 03.01.02 at 16:42, Dylan wrote:
PS - Could I use chown adagilson /windows/G to gain permission to write do this windows partition? because "root" is the owner but I didn't
No, not on windows partitions: the change will not stay done. I would not use a windows partition as home anyway... -- Cheers, Carlos Robinson
* Carlos E. R.
The 03.01.02 at 16:42, Dylan wrote:
PS - Could I use chown adagilson /windows/G to gain permission to write do this windows partition? because "root" is the owner but I didn't
No, not on windows partitions: the change will not stay done. I would not use a windows partition as home anyway...
change fstab to: /dev/hda1 /windows/D vfat users,gid=users,umask=0002,iocharset=iso8859-1,code=437 0 0 this will automatically mount the partition at boot and will give group root/users read/write access. add yourself (adagilson) to group users. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org icq#173753138
participants (5)
-
Carlos E. R.
-
Clayton
-
Dylan
-
SuSEnixER
-
Tom Emerson