problem with file's rights

O

old.Nugit

Guest
Hello... I've got a strange problem... each time I create a counter, the new counter file is only RW-R--R--... so I want to change it to RW-RW-RW-... with my FTP client software, when I try to do this, I receive the following answer : 'operation not permitted'. Aftern several attempts, I succeed and then it works... Had somebody same behaviour and how can we explain this ?

thank's in advance
 
O

old.Mozzer

Guest
Either your FTP Program is crap and you need a better one, I recommend Cute FTP which comes with a nifty HTML editor aswell or BWs FTP is going crazy. :)

Hope I helped! :p
 
C

caLLous

Guest
if you're referring to chmod'ing, then just use flashfxp or cuteftp, right click the file and select chmod 666...
 
O

old.Nugit

Guest
sorry... I already use CuteFtp... in fact, I find a solution... create the file on my HD, send it on FTP site and then change is working... when file is creating with my Php script, it doesn't work... perhaps a problem of owner, I don't know. Thank's for your answers
 
O

old.Mozzer

Guest
O right.. You were using a script to create the file??
 
S

(Shovel)

Guest
either you need to do some sort of CMOD type thingy from within the script, or set the containing directory to this setting?
 
O

old.Nugit

Guest
yes, I use a PHP script to create this file... containing directory has RWXRWXRWX properties so I think it's OK ;)
What my script does to create the file is :

$pFid = fopen ("$counter.dat", "w");
flock ($pFid, 1);
$cntVal = 0;
fputs ($pFid, $cntVal);

I have to search in PHP documentation to find what I need (CHMOD). Thank's for your help.

Cheers

Nugit
 
T

Tempy_Incursion

Guest
I have had the same problem with chmoding after a file is created by php, and I've always used WS_FTP Pro.

Shouldn't flock() be like: (after php 4.0.1 according to the manual)
flock($pFid, LOCK_SH);

With chmod(), for example:
chmod("counter.dat",0777);
 
O

old.Nugit

Guest
Thank's Tempy_Incursion... it works well now... nothing more to do when I will add a car on my site...
 

Users who are viewing this thread

Top Bottom