Results 1 to 4 of 4
Thread: Permissions problem?
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jul 2009
For the first problem I was thinking since I had created a separate partition for /home that I would have to give myself permission by modifying /etc/fstab. It didn't work. Any ideas?
The second one I find more bizarre. I can't run commands such as iwconfig, or shutdown. I get a "command not found". It's kinda annoying when I have to log out and log in as root just to properly shutdown my computer.
Checked again and it seems I can write files onto /home/nameOfUser but not /home/nameOfUser/Desktop. I guess I do have permissions to modify on that partition, just not on the Desktop. Still haven't fixed it yet.
Commands such as shutdown and ifconfig are located in /sbin, which is by default not in a users path, but it is in the path of root. That is because the executables that affect the system are in /sbin, and regular users shouldn't run these.
You can change this, as I did, by putting /sbin in your users path. You will then get a 'permission denied' rather than a 'command not found', which I prefer. Edit (as root) your /etc/profile or (as user) ~/.bashrc
But you don't really have to log out/log in as root to run these commands, you can `su` to root, do your thing and `exit` back to being user.
You can check permissions on files and directories with `ls -l`, you shouldn't have to change fstab to set permissions on your home dir. You can change permissions with `chmod` and you can change ownership with `chown`. Read the man pages for details.
When you use `chmod`, this list can come in handy:
0=no permission 1=x 2=w 3=wx 4=r 5=rx 6=rw 7=rwx
chmod 700 ~/DesktopCan't tell an OS by it's GUI
- Join Date
- Jul 2009
- Hungary, Europe
...and don't forget to see if you are the owner of your Desktop directory.
ls -ld Desktop
and see the owner's username in the third column.
I've always written it chmod 0xxx file
mainly because since I've been reading about it almost everything I can think of that I've read has used it this way in examples or instructions. Just a habit.
1xxx is sticky bit, which I hadn't used personally until I was tinkering with Linux From Scratch. I didn't finish it, but I had no problems up until the time I quit ... I was gonna hold off for a while ...
Also, according to the Filesystem Hierachy Standard 2.3:
/sbin : System binaries
Utilities used for system administration (and other root-only commands) are stored in /sbin, /usr/sbin, and /usr/local/sbin. /sbin contains binaries essential for booting, restoring, recovering, and/or repairing the system in addition to the binaries in /bin. Programs executed after /usr is known to be mounted (when there are no problems) are generally placed into /usr/sbin. Locally-installed system administration programs should be placed into /usr/local/sbin.