Results 1 to 4 of 4
I have two problems, they may be related. I only have these problems as a non-root user. The problems I'm having are 1) I do not have permissions to create/modify ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-16-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 4
Permissions problem?
I have two problems, they may be related. I only have these problems as a non-root user. The problems I'm having are 1) I do not have permissions to create/modify files on the Desktop and 2) certain commands are not usable unless you are specifially logged in as root.
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.
---
Update:
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.
- 07-16-2009 #2
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:
Changing a permission on your Desktop dir would look like this;Code:0=no permission 1=x 2=w 3=wx 4=r 5=rx 6=rw 7=rwx
Also, I don't want to sound like I am RTFM'ing you, but the Slackbook has lots of good info and tips.Code:chmod 700 ~/Desktop
Can't tell an OS by it's GUI
- 07-19-2009 #3Just Joined!
- Join Date
- Jul 2009
- Location
- Hungary, Europe
- Posts
- 9
...and don't forget to see if you are the owner of your Desktop directory.
cd
ls -ld Desktop
and see the owner's username in the third column.
Üdvrivalgással:
KEA.
- 07-27-2009 #4
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
Purpose
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.


Reply With Quote
