how is it that su - can be denied permission???
[ray@localhost xxxxx]$ su -
Password: [root@localhost ~]# ./ vncserver ./: Permission denied. [root@localhost ~]# am i wrong in my understanding of the root permisions, but dont they have full 100% access to everything in a linux box? how in the world am i being denied permission as the su? |
the file still needs to be executable to run like that.
chmod 755 vncserver ./vncserver |
what is 755 in the chmod?
i am familure with chmod +x to make things executable, but what is the 755. oh and found out i could run it if i navigated to the dir and just typed in vncserver without the ,/, but was under the impression that the ./ ment i could run it from what ever dir. i was currently in. is that wrong? |
Quote:
To confirm this, type: # which vncserver |
Quote:
http://www.linuxquestions.org/questi...hmod+itsjustme |
Calculating a Mode.
Owner Group Others rwx rwx rwx 400 200 100 40 20 10 4 2 1 _ Simply add up the numbers corresponding to the individual permission you want. If you want a permission of "rw-r--r--", you add: 400 + 200 + 40 + 4 = 644 Then at the command line, you must use the "chmod" command like this: chmod 644 filename thank you very much. so 755 would be rwx-rx-rx or something like that, but basicaly gives owner full permissions, and group, other read and execute. [edit] copy/paste did not work real well. edit again to note that this forum dose not keep spacing in post when it publishes the reply. there should be spacing enough between Owner, group, others to spread out the #s a little better. |
Use the code flags if you want to preserve the spacing.
|
The problem with your original command was the space between ./ and vncserver.
--Shade |
chmod except numbers too, (something i would like to see "ls -l" do, as the letters are all too long and i hate reading :))
something like "chmod 1755", but "chmod 0755" works to |
if you in /usr/bin and there is a file there named vncserver then these would work
/usr/bin/vncserver ./vncserver or since it's most likely in your path then this would work vncserver And yes, that an excellent point about the space there. I did not even see that. All you are doing is giving a path/filename --- . is the current path / is the seperator |
DavidPhillips thank you for the detailed explanation. now not only do i know how, but i know why. very important.
|
All times are GMT -5. The time now is 08:46 AM. |