SlackwareThis Forum is for the discussion of Slackware Linux.
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.
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.
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'?).
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.
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:
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!
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.
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
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??
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.