Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
|
 |
08-31-2003, 02:07 PM
|
#1
|
LQ Newbie
Registered: Aug 2003
Posts: 15
Rep:
|
Giving Perl chmod authority?
Hi,
This probably isn't what your expecting. No I don't want to know how to chmod 0755 perl files. I have been coding with Perl for year. The problem I'm having is that I've just setup a new Linux box with SlackWare 9. I've got perl, MySQL, dbi, lwp, etc running. But I've hit an age old problem I've had on some servers for years. That is when I have a chmod command in my code, Unix isn't letting Perl change the Chmod settings. I've always wondered why only some servers do this, and I guess now I'm about to find out. I'm old to Perl, but new to working with Unix directly. Is this because of SlackWare? Or is it a config setting I haven't hit?
The web folder is under ownership of user 'lyle', when I login directly or with SSH I can chmod using the standard Unix commands.
Please tell me what you need to know, or if I need to post to a different forum.
Thanks!

|
|
|
08-31-2003, 02:10 PM
|
#2
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
Welcome to LQ.
"Perl" or commands in perl scripts will have the same permissions as the user who is running them. If you need root permissions to make the specific chmod command then you may want to look at "sudo" be careful though - this can be dangerous.
|
|
|
08-31-2003, 02:19 PM
|
#3
|
LQ Newbie
Registered: Aug 2003
Posts: 15
Original Poster
Rep:
|
Hi,
The people running then could be anyone on the net. Whoever hits the URL.
How do I set the permissions? I'm new to this.
|
|
|
08-31-2003, 02:27 PM
|
#4
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
In that case it will be the user that the webserver runs as. Usually the "apache" user. I would be very careful if you are thinking of doing this as it could be a major security risk. What is it you are trying to do? I would reccomend finding another way round it if you can.
|
|
|
08-31-2003, 02:54 PM
|
#5
|
LQ Newbie
Registered: Aug 2003
Posts: 15
Original Poster
Rep:
|
I've been coding Perl for years.
I have an install script for one of my products, which creates directories, chmods files, etc.
On some servers I have installed my software on about 2/5. Recently it's been 1/5. They do not let my install script chmod the files or create the directories.
I don't know how to change permissions for a user. What program do I use, or file do I edit in SlackWare.
Thank you for your help.
|
|
|
08-31-2003, 02:58 PM
|
#6
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
I think that if you make apache the owner of the base directory for your product before you run your web based script then the server should have the ability to chmod as it sees fit.
|
|
|
08-31-2003, 04:00 PM
|
#7
|
LQ Newbie
Registered: Aug 2003
Posts: 15
Original Poster
Rep:
|
I tried
chown apache www
but it gave invalid user
|
|
|
08-31-2003, 04:04 PM
|
#8
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
It could be "nobody". check httpd.conf and see which user it is configured to run as. Is www the base dir into which your product is installed? It seems kind of odd.
|
|
|
08-31-2003, 05:38 PM
|
#9
|
LQ Newbie
Registered: Aug 2003
Posts: 15
Original Poster
Rep:
|
I've checked and it's nobody
www is the main folder for everything available through http.
cgi-bin/af/
is where the program files are.
|
|
|
All times are GMT -5. The time now is 10:28 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
|
|