LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-27-2006, 05:38 PM   #16
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217

Quote:
Originally Posted by raska
how do you have it mounted? I mean, with which options? Other options like user or users imply mounting as noexec.
Also "default" ...
 
Old 10-27-2006, 06:24 PM   #17
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Quote:
Originally Posted by Franklin
Also "default" ...
No it doesn't, default allows exec
Code:
From man mount
defaults
                     Use default options: rw, suid, dev, exec, auto, nouser, and async.
Besides, it doesn't make sense, nothing in the system would be usable at all, from my fstab:
Code:
...
/dev/sda1        /                   jfs         defaults                  1   1
...
 
Old 10-27-2006, 06:57 PM   #18
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
Duh ...

Mis-remembered my previous issues with this.

My bad. Sorry for the bad info.
Thanks for the correction.

Steve
 
Old 11-16-2009, 08:30 AM   #19
BelzeBob
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 9.10
Posts: 29

Rep: Reputation: 15
Permissions

Instead of starting a new thread.

The subject is Permissions.

OK. Hypothetical problem: I have a folder I want to delete. Let's say it's called "Apricot". But when I try to delete it I'm informed that I don't have the permission to do so. No permission to make any changes to the folder. Even though I was the one who made it in the first place. Now, how do I get permission to delete it? How do I do it?

Maybe it helps to be "root"? But when I try to install "$ sudo apt-get install root-system-bin" so root can work - I'm told that there are broken packages....

Or - can I make a terminal command, something like "sudo delete /home/user/various/apricot"?
 
Old 11-16-2009, 09:02 AM   #20
Martinezio
Member
 
Registered: May 2009
Location: Warsaw, Poland
Distribution: Slackware64-current
Posts: 191

Rep: Reputation: 32
Guys, stop solving hypothetical problems

The problem I think is that the configure file is executable, but not readable!

With no +x flags, configure script will not be recognized by shell as an executable, so the message will be "command not found" rather than "permission denied"
Permission denied got, when system cannot access to read the file!
 
Old 11-16-2009, 09:23 AM   #21
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
Quote:
Originally Posted by Martinezio View Post
Guys, stop solving hypothetical problems

The problem I think is that the configure file is executable, but not readable!

With no +x flags, configure script will not be recognized by shell as an executable, so the message will be "command not found" rather than "permission denied"
Permission denied got, when system cannot access to read the file!
And the easy fix for this is chmod +r
 
Old 11-16-2009, 09:29 AM   #22
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by BelzeBob View Post
Instead of starting a new thread.

The subject is Permissions.

OK. Hypothetical problem: I have a folder I want to delete. Let's say it's called "Apricot". But when I try to delete it I'm informed that I don't have the permission to do so. No permission to make any changes to the folder. Even though I was the one who made it in the first place. Now, how do I get permission to delete it? How do I do it?

Maybe it helps to be "root"? But when I try to install "$ sudo apt-get install root-system-bin" so root can work - I'm told that there are broken packages....

Or - can I make a terminal command, something like "sudo delete /home/user/various/apricot"?
To answer your hypothetical, you should check the permissions on the directory (../) containing the directory (./) with which you're working. In order to make changes in a directory, you need to be able to rwx the directory file which is, of course, a file in ../.
 
Old 11-17-2009, 04:53 AM   #23
BelzeBob
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 9.10
Posts: 29

Rep: Reputation: 15
Quote:
Originally Posted by PTrenholme View Post
To answer your hypothetical, you should check the permissions on the directory (../) containing the directory (./) with which you're working. In order to make changes in a directory, you need to be able to rwx the directory file which is, of course, a file in ../.
How do I do that?
 
Old 11-17-2009, 05:06 AM   #24
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
Quote:
Originally Posted by BelzeBob View Post
How do I do that?
Code:
cd ..
chmod +rwx <dirname>
Just substitute <dirname> with the name of directory you want to change permissions. Careful, this will give 'rwx' permissions to everyone on the system. If you want this to be only for the owner, group or anyone else, you can use (respectively):

chmod u+rwx <dirname>
chmod g+rwx <dirname>
chmod o+rwx <dirname>

If you need to find out the name of the directory use the command 'pwd' before you change directories and the system will tell you the full path of the directory which you can copy & paste into <dirname>.
 
Old 11-17-2009, 07:24 AM   #25
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
Quote:
Originally Posted by hussar View Post
The ./ is important. If it is omitted, your shell will search your $PATH variable to find the application "configure". It is unlikely that it will find one, unless you have "." in your $PATH variable. If it does find one, and "." is not in your $PATH variable, the one it finds will in all probability not be the one you want. Whenever you are compiling, it is a good idea, sometimes even required, to use the ./.

BTW, there is a school of thought that says that putting "." in your path is a bad thing for security reasons. I think that is probably true for root. For a normal user, it probably isn't as bad. Just for the record, I have "." in my $PATH.
This does not apply in the "sh configure" scenario. You are executing sh, which should be in $PATH, and configure is simply an argument. "sh configure" and "sh ./configure" would be the exact same thing.
 
Old 11-17-2009, 07:28 AM   #26
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
Quote:
Originally Posted by Martinezio View Post
Guys, stop solving hypothetical problems

The problem I think is that the configure file is executable, but not readable!

With no +x flags, configure script will not be recognized by shell as an executable, so the message will be "command not found" rather than "permission denied"
Permission denied got, when system cannot access to read the file!
Nope, not on this system anyway. When trying to execute a file with no execute permissions, I still get "permission denied"
 
Old 11-17-2009, 07:49 AM   #27
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
Quote:
Originally Posted by voyciz View Post
Nope, not on this system anyway. When trying to execute a file with no execute permissions, I still get "permission denied"
The "permission denied" is because the file is not set with execute permissions.

Also, in a script the very first line should define what is used to run the script. So if it is a shell script, your first line should be:
Code:
#!/bin/sh
or
#!/bin/bash
If it is a perl script:
Code:
#!/bin/pl
This allows your system to know what program to use to run the script and will eliminate the need to use 'sh' in front of the script name. Just like voyciz said, if the directory containing the script is not in your $PATH and you are in the directory where the script resides, then you most likely will need to add './' in front of the script:
Code:
sls$ ./runme
 
Old 11-17-2009, 08:07 AM   #28
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Quote:
Originally Posted by n0xvb View Post
If it is a perl script:
Code:
#!/bin/pl
huh? /usr/bin/perl I would think
 
Old 11-17-2009, 08:17 AM   #29
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
I guess it depends on the distro, on my HPUX and TRU64 boxes I only have to use #!/bin/pl for perl scripts

I've not written any perl scripts on my slack boxes
 
Old 11-18-2009, 05:11 AM   #30
BelzeBob
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 9.10
Posts: 29

Rep: Reputation: 15
Thanks guys. A lot of useful info here.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
./configure - permission denied Odan Linux - General 14 03-31-2013 10:04 AM
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
./configure: Permission denied Qing Feng Linux - Newbie 3 11-16-2004 11:08 AM
./configure --> permission denied mrosati Linux - Software 3 05-13-2004 02:48 PM
./configure errors: permission denied! TippExed Linux - Software 4 09-10-2002 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:40 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration