Re: File::Find with chmod trouble debugging

2009-07-08 Thread Harry Putnam
Telemachus writes: > On Mon Jul 06 2009 @ 3:31, Harry Putnam wrote: >> Thanks to all ... >> Now I'm curious about something else: >> >> Is the mode in a stat(file) readout something still different >> than octal or decimal? > > As John answered, there's more there than just the permissions. If

Re: File::Find with chmod trouble debugging

2009-07-06 Thread Telemachus
On Mon Jul 06 2009 @ 3:31, Harry Putnam wrote: > Thanks to all ... > Now I'm curious about something else: > > Is the mode in a stat(file) readout something still different > than octal or decimal? As John answered, there's more there than just the permissions. If you check perldoc -f stat, ther

Re: File::Find with chmod trouble debugging

2009-07-06 Thread John W. Krahn
Harry Putnam wrote: Thanks to all ... Now I'm curious about something else: Is the mode in a stat(file) readout something still different than octal or decimal? I see `33261' show up in the `mode' slot on a file with 755 permissions (from perldoc -f stat: [...] ($dev,$ino,$mode,$nli

Re: File::Find with chmod trouble debugging

2009-07-06 Thread Harry Putnam
Thanks to all ... Now I'm curious about something else: Is the mode in a stat(file) readout something still different than octal or decimal? I see `33261' show up in the `mode' slot on a file with 755 permissions (from perldoc -f stat: [...] ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$si

Re: File::Find with chmod trouble debugging

2009-07-06 Thread Telemachus
r are not the same thing. The good news is that your problem is a lot less bad than the more common one: chmod (755, foobar). (755 is 1363 in octal, an odd choice for permissions.) Try using printf and %o, which should give you 755 for $mode. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.

Re: File::Find with chmod trouble debugging

2009-07-06 Thread Chas. Owens
On Mon, Jul 6, 2009 at 08:00, Harry Putnam wrote: snip > Can anyone tell me how printing of $mode = 0755 turns into 493? snip >  my $mode = 0755; snip >             print "hpdb chmod $mode  $fname\n"; snip 0755 is 493. More specifically they are two representations of the sam

AW: File::Find with chmod trouble debugging

2009-07-06 Thread Thomas Bätzler
Harry Putnam asked: > The script below is my first usage of perls `chmod', but it appears to > be in keeping with the info at perldoc -f chmod. > > But somehow in the print of $mode it turns into 493... even though it > is set to 755. Its just the print though... the actual c

File::Find with chmod trouble debugging

2009-07-06 Thread Harry Putnam
The script below is my first usage of perls `chmod', but it appears to be in keeping with the info at perldoc -f chmod. But somehow in the print of $mode it turns into 493... even though it is set to 755. Its just the print though... the actual chmod appears to be working as expected.

Re: stat and chmod safety and prtability

2004-12-04 Thread JupiterHost.Net
Lawrence Statton wrote: Hello group: In attempting to set $file2 to the same mode as $file1 I do this: my $mode = (stat($file1))[2]; chmod $mode, $file2; That code does the trick but I just want to make sure of: 1) I see in perldoc -f chmod it talks about oct() but if I'm using stat&#x

Re: stat and chmod safety and prtability

2004-12-04 Thread Lawrence Statton
> Hello group: > > In attempting to set $file2 to the same mode as $file1 I do this: > >my $mode = (stat($file1))[2]; >chmod $mode, $file2; > > That code does the trick but I just want to make sure of: > > 1) > I see in perldoc -f chmod it talks ab

stat and chmod safety and prtability

2004-12-04 Thread JupiterHost.Net
Hello group: In attempting to set $file2 to the same mode as $file1 I do this: my $mode = (stat($file1))[2]; chmod $mode, $file2; That code does the trick but I just want to make sure of: 1) I see in perldoc -f chmod it talks about oct() but if I'm using stat's mode it should be s

Re: How to "chmod go-w $name" in perl?

2004-08-16 Thread John W. Krahn
Steven Shoemaker wrote: Hi, Hello, What am I doing wrong? And yes I know that there is a module for chmod but it is not loaded on this server that I need to run this on. The assumption here is that your code is not working correctly but you have not explained exactly what it is supposed to do so

How to "chmod go-w $name" in perl?

2004-08-15 Thread Steven Shoemaker
Hi, What am I doing wrong? And yes I know that there is a module for chmod but it is not loaded on this server that I need to run this on. use strict; use File::Find (); *name = *File::Find::name; File::Find::find({\&FixMode}, '.'); exit; sub FixMode { my ($dev,$ino,$mode,$n

Re: What are the dangers of leaving a cgi-bin directory CHMOD 777

2003-12-09 Thread Wiggins d Anconia
> > On Dec 8, 2003, at 3:15 PM, Dan Anderson wrote: > > > > > I have a perl script that writes to its directory, and as such > > the directory is CHMOD 777 in my cgi-bin. (Linux box) I figured this > > might be dangerous, but didn't think there w

Re: What are the dangers of leaving a cgi-bin directory CHMOD 777

2003-12-08 Thread drieux
On Dec 8, 2003, at 3:15 PM, Dan Anderson wrote: I have a perl script that writes to its directory, and as such the directory is CHMOD 777 in my cgi-bin. (Linux box) I figured this might be dangerous, but didn't think there was any harm in it. Am I right or will the script kiddi

Re: What are the dangers of leaving a cgi-bin directory CHMOD 777

2003-12-08 Thread R. Joseph Newton
Dan Anderson wrote: > I have a perl script that writes to its directory, and as such > the directory is CHMOD 777 in my cgi-bin. (Linux box) I figured this > might be dangerous, but didn't think there was any harm in it. Am I > right or will the script kiddi

What are the dangers of leaving a cgi-bin directory CHMOD 777

2003-12-08 Thread Dan Anderson
I have a perl script that writes to its directory, and as such the directory is CHMOD 777 in my cgi-bin. (Linux box) I figured this might be dangerous, but didn't think there was any harm in it. Am I right or will the script kiddies be all over me? -Dan -- To unsubscribe, e

Re: Using Net::FTP for chmod (help needed ASAP)

2003-11-15 Thread Rob Dixon
Jeff Westman wrote: > > Subject: Using Net::FTP for chmod (help needed ASAP) Jeff. This isn't a pitstop. It's a place for 'beginners' to learn. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Using Net::FTP for chmod (help needed ASAP)

2003-11-14 Thread Jeff Westman
Wiggins d Anconia <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > Much to my surprise, when I run this code, it never returns 0 if it > could not > > carry out the operation. > > > > $rc = $f->site("chmod 666 $remoteFile&q

Re: Using Net::FTP for chmod (help needed ASAP)

2003-11-14 Thread Wiggins d Anconia
> Hi, > > Much to my surprise, when I run this code, it never returns 0 if it could not > carry out the operation. > > $rc = $f->site("chmod 666 $remoteFile") > or die "ftp: Could not change permissions: $!\n"; > > It seems to return

Using Net::FTP for chmod (help needed ASAP)

2003-11-14 Thread Jeff Westman
Hi, Much to my surprise, when I run this code, it never returns 0 if it could not carry out the operation. $rc = $f->site("chmod 666 $remoteFile") or die "ftp: Could not change permissions: $!\n"; It seems to return a 2 on success, and a 5 if it could not acces

Re: NET::FTP problem w/CHMOD

2003-10-15 Thread [EMAIL PROTECTED]
Thanks Wiggins and Rob, '$ftp->site("CHMOD 755 $file")' worked the first time I popped it in - perfectly. Oddly, '$ftp->command("SITE CHMOD 755 $file")'and '$ftp->quot("SITE CHMOD 755 $file")' wouldn't hang the connecti

Re: NET::FTP problem w/CHMOD

2003-10-11 Thread Wiggins d'Anconia
Rob Dixon wrote: Hi. [EMAIL PROTECTED] wrote: I am trying to use the NET::FTP module to recursively chmod files. Either of these two ways of telling the server to chmod it seem to work: $ftp->command("SITE CHMOD 755 $file"); or $ftp->quot("SITE CHMOD 755 $file"); I&#x

Re: NET::FTP problem w/CHMOD

2003-10-11 Thread Rob Dixon
Hi. [EMAIL PROTECTED] wrote: > > I am trying to use the NET::FTP module to recursively chmod files. > Either of these two ways of telling the server to chmod it seem to work: > > $ftp->command("SITE CHMOD 755 $file"); > or > $ftp->quot("SITE CHMOD 755 $f

NET::FTP problem w/CHMOD

2003-10-10 Thread [EMAIL PROTECTED]
Hi I am trying to use the NET::FTP module to recursively chmod files. Either of these two ways of telling the server to chmod it seem to work: $ftp->command("SITE CHMOD 755 $file"); or $ftp->quot("SITE CHMOD 755 $file"); ...but once that runs once, even successfully, $ft

Re: chmod

2003-09-08 Thread R. Joseph Newton
delete the ending newline in > the lines in the first tables. So the data is put in two following lines > and not successively in one line. I tried chmod, but got error-messages. > > Whole part of code is: > foreach $el1 (@strings1) {chomp $el1: $m=0; > foreach $el2

Re: chmod -- chomp not chmod!!

2003-09-08 Thread R. Joseph Newton
Christiane Nerz wrote: > Oh-oh - there was a mistake - I tried chomp, not chmod.. > How do I use chomp correctly? I have an array of strings, want to cut > off the last \n in each line and use the rest of the line. (concatenate > it to another string) > Jane > Return to t

Re: chmod

2003-09-04 Thread John W. Krahn
sh @ergebnis_alles, $whole_data1[$l] . $whole_data2[$m]; > Anything works fine, except that I can't delete the ending newline in > the lines in the first tables. So the data is put in two following lines > and not successively in one line. I tried chmod, but got error-messages. You want t

Re: chmod -- chomp not chmod!!

2003-09-04 Thread Sudarshan Raghavan
Christiane Nerz wrote: Oh-oh - there was a mistake - I tried chomp, not chmod.. How do I use chomp correctly? I have an array of strings, want to cut off the last \n in each line and use the rest of the line. (concatenate it to another string) Jane Hi all! I like to read several rows out of

Re: chmod -- chomp not chmod!!

2003-09-04 Thread Christiane Nerz
Oh-oh - there was a mistake - I tried chomp, not chmod.. How do I use chomp correctly? I have an array of strings, want to cut off the last \n in each line and use the rest of the line. (concatenate it to another string) Jane Hi all! I like to read several rows out of two different table-files

chmod

2003-09-04 Thread Christiane Nerz
s. So the data is put in two following lines and not successively in one line. I tried chmod, but got error-messages. Whole part of code is: foreach $el1 (@strings1) { $m=0; foreach $el2 (@strings2) { if ($el1 eq $el2) [EMAIL PROTECTED] =

Re: counter script and chmod 755

2002-03-28 Thread Jenda Krynicky
From: Bill Bartok <[EMAIL PROTECTED]> > I am putting a counter on a website for the first time. I undstand that > because the server is Unix that I will need to se permission for the > counter. > > I believe this can be done within the Perl script using

RE: counter script and chmod 755

2002-03-28 Thread David Gray
> I am putting a counter on a website for the first time. I > undstand that because the server is Unix that I will need to > se permission for the counter. > > I believe this can be done within the Perl script using the line: > > chmod (0755, "counter.cgi"); &g

counter script and chmod 755

2002-03-28 Thread Bill Bartok
I am putting a counter on a website for the first time. I undstand that because the server is Unix that I will need to se permission for the counter. I believe this can be done within the Perl script using the line: chmod (0755, "counter.cgi"); right within the counter.cgi script i

Re: OT: Need Help with chmod and unix permissions - NEVER MIND!

2001-07-10 Thread ehughes
Sorry folks, I found the relevant section in my manual. I should have looked harder. Sorry to trouble you with an OT subject. Elton = NOVA 505 W. Olive Ave. Suite 550 Elton Hughes (I

OT: Need Help with chmod and unix permissions

2001-07-10 Thread ehughes
Hello All, This is OFF-TOPIC! It has nothing to do with Perl, unless someone has a Perl solution that is. If you are not into Unix and sysadmin stuff, please delete this and go on. I need help in coming up with a chmod command that will end up like this: -r-sr-xr-t I need to set the sticky

Re: problems with chmod

2001-07-07 Thread charles
> > This will tell you why or how something might be going wrong and what your > pwd is. Also, you should check the parent directory in which you are > trying to make this directory for directory permissions (seteuid) which can > cause the directory to be created the same as the parent directory.

Re: problems with chmod

2001-07-07 Thread Jim Conner
ons in >a mkdir statement if they are more restrictive than my umask. otherwise >the perms default to my umask. >i know i can get past this by following the mkdir statement with a chmod, >but i just wanted to verify that my logic on this one is correct. - Jim -~-~-~-~-~-~-~-~-~-~-~

Re: problems with chmod

2001-07-07 Thread Walt Mankowski
k. otherwise > the perms default to my umask. > i know i can get past this by following the mkdir statement with a chmod, > but i just wanted to verify that my logic on this one is correct. The second parameter to mkdir is just a mask, it's not the permission settings for the new directory. See perldoc -f mkdir for more information. Walt

problems with chmod

2001-07-07 Thread charles
only pattern that i see is that i *can* explicitly set the permissions in a mkdir statement if they are more restrictive than my umask. otherwise the perms default to my umask. i know i can get past this by following the mkdir statement with a chmod, but i just wanted to verify that my logic on this one is correct.