Hello there,
I have a perl script which I made a directory for in my home directory and I am currently unable to get the file to run. What permissions should be put on a pl file? I am assuming read and execute. All this script does is go up to everydns.net and make sure that my web server address always refers to my ip through A records. Thanks for the help.
Scott
On Mon, 2007-07-02 at 09:34 -0500, Scott Berry wrote:
I have a perl script which I made a directory for in my home directory and I am currently unable to get the file to run. What permissions should be put on a pl file? I am assuming read and execute.
I'm not sure about perl scripts, but other script types usually require some of the following:
Being readable and executable.
You entering the path to the script to run, rather than just the name. e.g. /home/tim/runme or ./runme
Or putting the script into a ~/bin/ directory that's in your path (then you don't have to enter the path).
The start of the script having a shebang line saying what's supposed to run the script. e.g. #!/usr/bin/perl
All this script does is go up to everydns.net and make sure that my web server address always refers to my ip through A records. Thanks for the help.
Perhaps a script like that shouldn't be run from the homespace. You'd normally have a server running all the time, so it'd be some form of daemon or cron job.
It's a cron job is what the eDNs group suggests. I will put it in to bin then and see what happens.
Scott
----- Original Message ----- From: "Tim" ignored_mailbox@yahoo.com.au To: "For users of Fedora" fedora-list@redhat.com Sent: Monday, July 02, 2007 10:03 AM Subject: Re: a question about perl scripts
On Mon, 2007-07-02 at 09:34 -0500, Scott Berry wrote:
I have a perl script which I made a directory for in my home directory and I am currently unable to get the file to run. What permissions should be put on a pl file? I am assuming read and execute.
I'm not sure about perl scripts, but other script types usually require some of the following:
Being readable and executable.
You entering the path to the script to run, rather than just the name. e.g. /home/tim/runme or ./runme
Or putting the script into a ~/bin/ directory that's in your path (then you don't have to enter the path).
The start of the script having a shebang line saying what's supposed to run the script. e.g. #!/usr/bin/perl
All this script does is go up to everydns.net and make sure that my web server address always refers to my ip through A records. Thanks for the help.
Perhaps a script like that shouldn't be run from the homespace. You'd normally have a server running all the time, so it'd be some form of daemon or cron job.
-- (This box runs FC5, my others run FC4 & FC6, in case that's important to the thread.)
Don't send private replies to my address, the mailbox is ignored. I read messages from the public lists.
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
-- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.9.14/883 - Release Date: 7/1/2007 12:19 PM
On Mon, 2007-07-02 at 10:12 -0500, Scott Berry wrote:
It's a cron job is what the eDNs group suggests. I will put it in to bin then and see what happens.
Which bin? For personal stuff, putting scripts in ~/bin/ is often appropriate. For *system* stuff, that'd normally be /bin/. For applications, something like /usr/bin/ or /usr/local/bin/. If it's called from a cron script, it could be run from almost anywhere, so long as the cron script calls it by the full path. I'd expect their script to give you information about where to put it, if it needed putting somewhere in particular.
I have something similar for the No-IP service. It's a script (run from /usr/local/bin/noip2) which you start running from somewhere (such as /etc/rc.local), and it periodically checks for changes to your IP, by itself.
Hi Tim,
I ended up putting it /usr/bin and got it set up today.
Scott ----- Original Message ----- From: "Tim" ignored_mailbox@yahoo.com.au To: "For users of Fedora" fedora-list@redhat.com Sent: Monday, July 02, 2007 9:53 PM Subject: Re: a question about perl scripts
On Mon, 2007-07-02 at 10:12 -0500, Scott Berry wrote:
It's a cron job is what the eDNs group suggests. I will put it in to bin then and see what happens.
Which bin? For personal stuff, putting scripts in ~/bin/ is often appropriate. For *system* stuff, that'd normally be /bin/. For applications, something like /usr/bin/ or /usr/local/bin/. If it's called from a cron script, it could be run from almost anywhere, so long as the cron script calls it by the full path. I'd expect their script to give you information about where to put it, if it needed putting somewhere in particular.
I have something similar for the No-IP service. It's a script (run from /usr/local/bin/noip2) which you start running from somewhere (such as /etc/rc.local), and it periodically checks for changes to your IP, by itself.
-- [tim@bigblack ~]$ rm -rfd /*^H^H^H^H^H^H^H^H^H^Huname -ipr 2.6.21-1.3228.fc7 i686 i386
Using FC 4, 5, 6 & 7, plus CentOS 5. Today, it's FC7.
Don't send private replies to my address, the mailbox is ignored. I read messages from the public lists.
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
-- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.9.14/883 - Release Date: 7/1/2007 12:19 PM
Scott Berry wrote:
Hello there,
I have a perl script which I made a directory for in my home directory and I am currently unable to get the file to run. What permissions should be put on a pl file? I am assuming read and execute.
Correct, the file needs to be readable and executable by whoever is going to be running it. The first line of the file (the #! line) must also point to the correct location of the perl interpreter (#!/usr/bin/perl).
Normally you'd use something like
chmod 755 script.pl
..to make the script executable by anyone with read permissions on the directory it's in, and make it editable by you.
You should of course be able to run any perl script with just read permissions by doing:
perl script.pl
If you're still having problems then post the output you get when you try to run the script.
Hope this helps
Simon.