[wellylug] Issues with a perl script

michael at diaspora.gen.nz michael at diaspora.gen.nz
Thu Oct 26 15:17:43 NZDT 2006


scott writes:
>It seems that passing the commands is not working correctly in this
>script- I removed the modifiers and played around with it a bit- this
>seemed to work, but it doesnt have the directory permissions as
>required...

>  mkdir("/home/scott/profiles/$name");

>> mkdir("/profiles/$name", 0700);
			  ^^^^^^

You also removed the bit that assigns the directory permissions.  A quick guide:

    0700 -- drwx------
    0711 -- drwx--x--x
    0755 -- drwxr-xr-x

(There's more, but for home directories, that's probably what you need.
"man chmod" for more information.)

Also,

> if (-e "/profiles/$name") {
>     next;
> }

This bit checks to see if the directory has already been created, but...

>  mkdir("/home/scott/profiles/$name");

This bit creates a different directory.

    -- michael.




More information about the wellylug mailing list