LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-23-2004, 09:23 PM   #1
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
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?
 
Old 03-23-2004, 09:38 PM   #2
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
the file still needs to be executable to run like that.


chmod 755 vncserver
./vncserver
 
Old 03-23-2004, 09:42 PM   #3
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
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?
 
Old 03-23-2004, 10:11 PM   #4
Brane Ded
Member
 
Registered: Nov 2003
Location: over there
Distribution: Debian Testing
Posts: 191

Rep: Reputation: 30
Quote:
Originally posted by Lleb_KCir
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?
The './' part tells it to run an executable file in the directory you're currently in. If you're not in that directory, you have to type out the full path, unless the file is in a directory in your system path. If you can execute it without the './,' that should mean it's in your path.

To confirm this, type:
# which vncserver
 
Old 03-23-2004, 10:30 PM   #5
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 45
Quote:
Originally posted by Lleb_KCir
what is 755 in the chmod?

i am familure with chmod +x to make things executable, but what is the 755.
Check this out:

http://www.linuxquestions.org/questi...hmod+itsjustme
 
Old 03-23-2004, 10:39 PM   #6
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
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.

Last edited by Lleb_KCir; 03-23-2004 at 10:43 PM.
 
Old 03-23-2004, 10:58 PM   #7
Brane Ded
Member
 
Registered: Nov 2003
Location: over there
Distribution: Debian Testing
Posts: 191

Rep: Reputation: 30
Use the code flags if you want to preserve the spacing.
 
Old 03-23-2004, 11:11 PM   #8
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
The problem with your original command was the space between ./ and vncserver.

--Shade
 
Old 03-24-2004, 01:46 AM   #9
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
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
 
Old 03-24-2004, 10:31 PM   #10
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
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
 
Old 03-24-2004, 10:47 PM   #11
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
DavidPhillips thank you for the detailed explanation. now not only do i know how, but i know why. very important.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
Permission Denied jamesvenning1 Linux - Newbie 4 06-05-2005 11:32 AM
Permission denied jagman026 Fedora 3 01-01-2005 03:45 PM
Permission Denied ptreves Linux - Newbie 7 12-16-2004 02:14 PM
Permission denied? jbhoo Linux From Scratch 1 04-27-2002 09:12 PM


All times are GMT -5. The time now is 03:00 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration