LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 03-07-2009, 11:39 PM   #1
Mol_Bolom
Member
 
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0 / 14.2
Posts: 245
Blog Entries: 2

Rep: Reputation: 41
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.
 
Old 03-08-2009, 04:42 AM   #2
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
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.
 
Old 03-08-2009, 03:04 PM   #3
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
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).
 
Old 03-08-2009, 05:13 PM   #4
Mol_Bolom
Member
 
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0 / 14.2
Posts: 245

Original Poster
Blog Entries: 2

Rep: Reputation: 41
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.
 
Old 03-08-2009, 05:21 PM   #5
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
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..
 
Old 03-08-2009, 05:22 PM   #6
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
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.
 
Old 03-08-2009, 05:44 PM   #7
Mol_Bolom
Member
 
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0 / 14.2
Posts: 245

Original Poster
Blog Entries: 2

Rep: Reputation: 41
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...
 
Old 03-08-2009, 06:54 PM   #8
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
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.
 
  


Reply



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
Can't mount nfs share from fstab but can mount it manually - help Mountain Linux - Networking 1 03-30-2008 08:34 PM
mount floppy manually trackrat SUSE / openSUSE 8 09-06-2005 07:31 PM
user cant mount after chmod 777 /bin/mount misterwiddle Linux - General 2 04-06-2005 05:36 PM
Must mount CD manually - syntax, please? jhecht Linux - Software 11 07-22-2004 12:49 PM
Manually Reconnecting all the time - what gives...? perry Linux - Networking 1 11-15-2003 06:45 PM

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

All times are GMT -5. The time now is 01:44 AM.

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