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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-07-2009, 11:39 PM
|
#1
|
Member
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0 / 14.2
Posts: 245
Rep:
|
have to chmod every time I manually mount hd
I dual boot with Zenwalk 5.2 and Slackware 12.2. Both of their fstab files are identical, except that Zenwalk sees the partitions as sd and Slack as hd.
Anyway...I have two partitions on a 40g hd which I only mount manually. In Zenwalk, I have no problems with these drives, they mount fine, and I can move to the directories and view the files that exist with no problems, however, in Slackware, no matter how often I chmod the drives, after I umount them then I have to re-chmod them again when I re-mount them, every single file, every single dir.
Neither Zenwalk nor Slackware have these partitions in their fstab files, so what other configuration files, etc should I look at as to what is causing this?
Thanks.
|
|
|
03-08-2009, 04:42 AM
|
#2
|
Member
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252
Rep:
|
What filesystems are on the partitions? If it's ext* or some other unix/linux filesystem, the permissions should be preserved when you unmount. But if it's NTFS or FAT, the permissions and ownership are set by options to mount. Only thing is, if that were the problem, I wouldn't expect chmod to help, but it's the only thing that comes to mind.
|
|
|
03-08-2009, 03:04 PM
|
#3
|
Member
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213
Rep:
|
You can forget distro specific config files by adding the correct permissions to your fstab. Unless you want different permissions for different files, which only is possible if the partition type is a linux/unix one (as said by openSauce) and users IDs and logins on the systems which will mount the partition are equal (/etc/passwd and /etc/group).
|
|
|
03-08-2009, 05:13 PM
|
#4
|
Member
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0 / 14.2
Posts: 245
Original Poster
Rep:
|
Thanks...However, that didn't help...
<Edit> Not important since I stated it below briefly, but the partitions are ntfs. However, with this issue I guess it's unimportant for the problem still persists
</edit>
Unfortunately, I didn't notice that I did have those drives in the Zenwalk fstab, but even editing Slackwares fstab file didn't help either...Using -t ntfs, didn't do anything, also...
Anyway, I think I'll just copy the files I want to keep onto Zenwalk then repartition the drive into ext2. I've been meaning to do so, but there are a lot of files on those drives and I'm just playing it lazy...  ...
Just out of curiosity, though. Could the kernel be causing this? Slackware uses 2.6.27.7 (partitions read as hd), Zenwalk uses 2.6.25.4 (partitions read as sd).
Last edited by Mol_Bolom; 03-08-2009 at 05:15 PM.
|
|
|
03-08-2009, 05:21 PM
|
#5
|
Member
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252
Rep:
|
So the partitions are NTFS?
Try
Code:
mount /dev/hdax /mnt/hdax -o uid=###,gid=###,dmask=000,fmask=111
See NTFS options in man mount. ### is your numeric user/group id.
I've seen so many questions about this lately, there needs to be a sticky..
|
|
|
03-08-2009, 05:22 PM
|
#6
|
Member
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213
Rep:
|
And adding uid, gid, umask, dmask and fmask (man mount) options to both fstab's didn't help?
It will always mount your partition with the user id owner specified in each system. That should work. And also should work using ntfs-3g instead of ntfs.
Last edited by emi_ramo; 03-08-2009 at 05:23 PM.
|
|
|
03-08-2009, 05:44 PM
|
#7
|
Member
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0 / 14.2
Posts: 245
Original Poster
Rep:
|
Thanks, that did it.
I didn't quite fully understand what you were talking about until openSauce wrote this
Code:
mount /dev/hdax /mnt/hdax -o uid=###,gid=###,dmask=000,fmask=111
I'm still too much of a noob, and there are thousands of things to read, let alone knowing the correct terminology to even search for...
But either way, it still is strange that Zenwalk doesn't have anything like that in it's fstab and works just fine...
This is what it looks like in my zenwalk fstab...
Code:
/dev/sdb1 /mnt/disk/a ntfs noauto 1 2
/dev/sdb2 /mnt/disk/b ntfs noauto 1 2
And my Slackware now looks like this...
Code:
/dev/hdb1 /mnt/hdb ntfs uid=1000,gid=1000,dmask=000,fmask=111 1 2
/dev/hdb2 /mnt/hdb2 ntfs uid=1000,gid=1000,dmask=000,fmask=111 1 2
Again, thanks...
|
|
|
03-08-2009, 06:54 PM
|
#8
|
Member
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252
Rep:
|
Yeah, it's a bit of a learning curve! But don't worry, we've all been there. The difference between slack and zen is probably in the default umask - you should find the command umask gives different outputs on each one.
In case you hadn't worked it out, the {f,d,u}mask values are like inverted chmod permissions - 000 gives rwxrwxrwx permissions to your directories, and 111 gives rw-rw-rw- to the regular files.
|
|
|
All times are GMT -5. The time now is 03:13 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|