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
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
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
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
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.
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
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
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.
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
> 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
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
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
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
>
> 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
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
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
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
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]
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
> 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
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
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
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
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
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
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
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
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
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
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
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] =
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
> 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
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
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
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
>
> 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.
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
-~-~-~-~-~-~-~-~-~-~-~
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
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.
40 matches
Mail list logo