Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Re: opening new file in different directory

by IraTarball (Monk)
on Oct 23, 2001 at 20:42 UTC ( #120835=note: print w/replies, xml ) Need Help??


in reply to Re: Re: opening new file in different directory
in thread opening new file in different directory

Man this smells like a permissions issue. It's possible to have permission to cd into a directory without having permission to ls in it. This is a freaky benefit of the *nix user/group permission bits. If'n I was you, I'd play with accessing these files from the command line, just with touch and vi, to see if there's some intermediate directory that's got permission funkiness. Make sure you do this with the user that the script runs as.

Or, another good thing to see, would be the ls -ld output on the directories you've listed up there.

This is one of those things that, as blackmateria said, should work. It's irritating that it doesn't.

Ira,

"So... What do all these little arrows mean?"
~unknown

Replies are listed 'Best First'.
Re(4): opening new file in different directory
by graq (Curate) on Oct 24, 2001 at 18:47 UTC
    I am not convinced it has anything to do with the permissions on the file or directory.
    From the paths used in the original post, it is not a Windoze machine, so with a little cut'n'paste from a Mandrake box:
    __PASTE-ONE__ ~/temp/graq> ls -l -r-------- 1 graq graq 7 Oct 24 15:50 Testing.txt ~/temp/graq> cd .. ~/temp> chmod 100 graq ~/temp> perl relpath.pl graq/Testing.txt: Permission denied __END__
    So the error is Permission denied for a file with permission problems.
    __PASTE-TWO__ ~/temp> cat relpath.pl #!/usr/bin/perl -w use strict; my $file = 'graq/Testing.txt'; open( TESTING, ">$file") or die ( "$file: $!\n" ); print TESTING `date`; close TESTING; __END__

    <a href="http://www.graq.co.uk">Graq</a>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://120835]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2019-05-26 01:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (152 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!