LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-03-2002, 05:56 AM   #1
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 11.10
Posts: 425
Blog Entries: 1

Rep: Reputation: 36
/bin/.: Permission denied


Hi I'm trying to execute a script as user int the current shell and when I do the following

. ./etc/profile.d/myconfigure.sh

I get this output

/bin/.: Permission denied

Even if I do "chmod 777 /bin/." as superuser it keeps telling me that I cannot execute the script as I want to.
Do you know how can I change the permissions for that?
thnx.
Aizkorri.
 
Old 10-03-2002, 06:25 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Quote:
Hi I'm trying to execute a script as user int the current shell and when I do the following

. ./etc/profile.d/myconfigure.sh
Try without the second dot:

. /etc/profile.d/myconfigure.sh

Hope this helps.
 
Old 10-03-2002, 06:41 AM   #3
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 11.10
Posts: 425
Blog Entries: 1

Original Poster
Rep: Reputation: 36
It returns the same permission problem. help!
 
Old 10-03-2002, 06:50 AM   #4
sandy
Member
 
Registered: Aug 2002
Location: Mumbai,India
Distribution: Linux Mint 12, Gentoo
Posts: 230

Rep: Reputation: 30
Quote:
Originally posted by aizkorri
It returns the same permission problem. help!
Will you please post the shell script if it is not too longer?
 
Old 10-03-2002, 08:48 AM   #5
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 11.10
Posts: 425
Blog Entries: 1

Original Poster
Rep: Reputation: 36
It's very simple:

PATH="$PATH:/usr/bin/"
DATA_FILE=/usr/lib/DATA_FILE
export DATA_FILE PATH
 
Old 10-03-2002, 02:49 PM   #6
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Are you logged in as a regular user? Then, do you have the correct rights to access /etc/profile.d/myconfigure.sh and access the directory it is in ? (/etc/profile.d) ?

I copied/pasted your script to my home-dir and there's no problem if I do:

cd ~
. ./myconfigure.sh

...so it has probably to do with your rights as a regular user to the directory or the file.

Agur,

Hko
 
Old 10-04-2002, 03:41 AM   #7
sandy
Member
 
Registered: Aug 2002
Location: Mumbai,India
Distribution: Linux Mint 12, Gentoo
Posts: 230

Rep: Reputation: 30
I think the problem is in the third line. Just check for the permissions of the shells /bin/bash and /bin/sh since export is a command in the bash and sh shell
 
Old 10-04-2002, 08:10 AM   #8
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 11.10
Posts: 425
Blog Entries: 1

Original Poster
Rep: Reputation: 36
thnx, I will check the permissions of the file and shells.
agur.
 
Old 03-17-2010, 01:17 PM   #9
cole42
LQ Newbie
 
Registered: Mar 2008
Posts: 4

Rep: Reputation: 0
type;
env | grep SHELL

running csh or bash? if it's csh that's your problem.

hit this one myself today, my user is using csh when I thought it was bash...
 
Old 03-17-2010, 01:33 PM   #10
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by aizkorri View Post
It's very simple:

PATH="$PATH:/usr/bin/"
DATA_FILE=/usr/lib/DATA_FILE
export DATA_FILE PATH
Does the script have

Code:
#!/bin/sh
as its very first line ?
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
su: /bin/bash: Permission denied dwarf007 Linux - General 10 01-20-2006 04:32 PM
/bin/sh:texis.T: Permission denied rl5 Linux From Scratch 1 04-03-2004 01:13 PM
Cannot execute /bin/bash: Permission denied Hegemon Linux - General 4 01-19-2004 04:13 AM
/bin/sh Permission Denied vi0lat0r Linux - Newbie 1 08-26-2003 07:46 AM
cannot execute /bin/bash: Permission Denied peeples Linux From Scratch 24 10-25-2002 08:07 AM


All times are GMT -5. The time now is 08:38 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