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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-03-2002, 05:56 AM
|
#1
|
Member
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434
Rep:
|
/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.
|
|
|
10-03-2002, 06:25 AM
|
#2
|
Senior Member
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536
Rep: 
|
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.
|
|
|
10-03-2002, 06:41 AM
|
#3
|
Member
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434
Original Poster
Rep:
|
It returns the same permission problem. help!
|
|
|
10-03-2002, 06:50 AM
|
#4
|
Member
Registered: Aug 2002
Location: Mumbai,India
Distribution: Linux Mint 12, Gentoo
Posts: 230
Rep:
|
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? 
|
|
|
10-03-2002, 08:48 AM
|
#5
|
Member
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434
Original Poster
Rep:
|
It's very simple:
PATH="$PATH:/usr/bin/"
DATA_FILE=/usr/lib/DATA_FILE
export DATA_FILE PATH
|
|
|
10-03-2002, 02:49 PM
|
#6
|
Senior Member
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536
Rep: 
|
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
|
|
|
10-04-2002, 03:41 AM
|
#7
|
Member
Registered: Aug 2002
Location: Mumbai,India
Distribution: Linux Mint 12, Gentoo
Posts: 230
Rep:
|
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 
|
|
|
10-04-2002, 08:10 AM
|
#8
|
Member
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434
Original Poster
Rep:
|
thnx, I will check the permissions of the file and shells.
agur.
|
|
|
03-17-2010, 01:17 PM
|
#9
|
LQ Newbie
Registered: Mar 2008
Posts: 4
Rep:
|
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...
|
|
|
03-17-2010, 01:33 PM
|
#10
|
Senior Member
Registered: May 2005
Posts: 4,481
|
Quote:
Originally Posted by aizkorri
It's very simple:
PATH="$PATH:/usr/bin/"
DATA_FILE=/usr/lib/DATA_FILE
export DATA_FILE PATH
|
Does the script have
as its very first line ?
|
|
|
All times are GMT -5. The time now is 12:57 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|