LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-29-2004, 04:27 AM   #1
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Rep: Reputation: 90
Basic user:group question


I am having some problems with file permissions, and have first of all a basic question:
To which groups should I (as user) belong to? Now it's only 'users', but as I remember correctly, in RH is was member of other groups as well (for example 'floppy', 'root'?).

Leon.
 
Old 01-29-2004, 07:41 AM   #2
yuray
Member
 
Registered: Apr 2003
Location: Russia, Khotkovo
Distribution: Debian
Posts: 146

Rep: Reputation: 15
It depends on what you will do as 'user'.
 
Old 01-29-2004, 07:49 AM   #3
gkneller
LQ Newbie
 
Registered: Jan 2004
Location: UK
Distribution: Slackware & Debian
Posts: 27

Rep: Reputation: 15
You need to know what it is you want to be able to do as an ordinary user, and from that work out which groups you need to be a member of. Sorry that isn't more helpful, but I find the easiest way to approach this (at least on a home computer - you couldn't do this if you had loads of users!) is just to solve permissions issues as they arise - if you find that you can't mount the cd-rom drive, for instance, just add yourself to (or create) a group that can.
 
Old 01-29-2004, 08:58 AM   #4
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Original Poster
Rep: Reputation: 90
Sorry I wasn't more specific. But the following is the case:
I 'moved on' from RH9 to Slack9.1, and I had /home on a separate partition to keep personal settings and stuff. First, as user leon, I couldn't access /home/leon because Slack assigns different uid's than RH. But that's solved.

Now, I have another partition (fat32) which is mounted on /mnt/data. I can only access that as root. But when I want to chmod it, I do not have the permission for that (as root!).

bash-2.05b$ cd /mnt/data
bash: cd: /mnt/data: Permission denied
bash-2.05b$ su
Password:
bash-2.05b# cd /mnt/data
bash-2.05b# chown leon /mnt/data
chown: changing ownership of `/mnt/data': Operation not permitted
bash-2.05b#

I have tried all kinds of chmods and chowns, changing fstab but nothing helps. Originally, after fresh install, mounting /mnt/data was set at 'defaults' initially. I changed it without any effects to this:

/dev/hda7 swap swap defaults 0 0
/dev/hda9 / ext3 defaults 1 1
/dev/hda8 /home ext3 defaults 1 2
/dev/hda6 /boot ext3 defaults 1 2
/dev/hda5 /mnt/data vfat user,rw,exec,uid=500 0 0
/dev/hda1 /mnt/winxp ntfs defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0


PLEASE, ANYONE! I am almost forced to boot XP in order to work with my files....

- Desperate Slacker -
 
Old 01-29-2004, 04:07 PM   #5
changcheh
Member
 
Registered: Nov 2003
Location: china
Distribution: Linux Mint
Posts: 49

Rep: Reputation: 15
this is not a permissions issue

this is not a permissions issue, its to do with your fstab file. I found that using an fstab line in /etc/fstab like the one below allows me to access it fine. The problem with permissions on fat drives is that windows 9x only allows read/write/execute/archive/hidden file permissions so that is all that can be offered even under linux. Change /mp3 to whatever mountpoint you want e.g. /windows.

/dev/hdb1 /mp3 vfat rw,exec,user,umask=000 0 0

I think you may have to change user to whatever group you belong to. rw gives read write permissions, exec gives execute permissions. Not sure what umask does but it works for me!
 
Old 01-29-2004, 05:09 PM   #6
Rudebr00d
Member
 
Registered: Jun 2003
Posts: 34

Rep: Reputation: 15
umask assigns permissions automatically to newly created files. The syntax varies from chmod though in that it works in inverse order. IE:
Code:
chmod 777
is equivalent to
Code:
umask 000
.

In this case I'm assuming that when the partition was loaded it treated the new directories under /mnt/data as newly created and assigned permissions so that you as the user could not even read them! Using umask should as illustrated by changcheh should alleviate it, I think.
 
Old 01-29-2004, 05:33 PM   #7
urka58
Member
 
Registered: Nov 2003
Distribution: slackware 15
Posts: 546

Rep: Reputation: 43
Try to give noauto option in your/etc/fstab file like this
/dev/hda5 /mnt/data vfat user,rw,exec,uid=500 0 0
replaced by
/dev/hda5 /mnt/data vfat noauto,user,ro 0 0
or check if uid=500 is correct.
I suspect uid numeration on slack starts from 1000 on
 
Old 01-30-2004, 12:11 AM   #8
yuray
Member
 
Registered: Apr 2003
Location: Russia, Khotkovo
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Try:
bash-2.05b# cd /mnt/data
bash-2.05b# chown leon .
 
Old 01-30-2004, 01:55 AM   #9
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Original Poster
Rep: Reputation: 90
Quote:
/dev/hdb1 /mp3 vfat rw,exec,user,umask=000 0 0
Thanks, this seems to work! Still don't understand exactly how this umask functions, but either one of you gurus explains it for the newbies ;-) or I'll read up on it.

Happy Slacking again!!!

One thing puzzles me though: why was it impossible for root to change permissions/ownership of the dirs on this partition??

Last edited by BroX; 01-30-2004 at 02:07 AM.
 
Old 01-30-2004, 06:15 AM   #10
changcheh
Member
 
Registered: Nov 2003
Location: china
Distribution: Linux Mint
Posts: 49

Rep: Reputation: 15
changing permissions

It's like I said root cannot change permissions on your fat partition as fat does not support ownership of files. If you had a ext3 filesystem or reiserfs etc on another drive you could have as these systems support file ownership.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 12 01-27-2013 01:14 PM
User and Group Admin: How to tell Who is in What group? Akhran Linux - Newbie 1 11-12-2005 11:16 PM
Who can tell me why? (user and group) shadkong Slackware 5 05-21-2005 12:00 AM
question about user/group & directory... hct224 Linux - Newbie 2 10-11-2003 02:28 PM
Question about user/group rights ShibbyLinux Linux - General 1 04-15-2002 03:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:05 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