Hello again,
i have setup a simple fwrite function into a .txt file. On one server i have no problem with chmod a .txt file into a 666. On the other
everytime i try to chmod it, i get error that operation cannot be carried out or something. I tried multiple ftp programs and everytime
i get the similar error ... Is there any other way to chmod the file? Im trying to contact the support, but its seems their email is more
like regular mail .
Any thoughts?
Regards,
Heki
A question why i cant chmod a .txt file
Started by
HEki_
, Mar 03 2011 03:27 PM
5 replies to this topic
#1
Posted 03 March 2011 - 03:27 PM
#2
Posted 03 March 2011 - 10:27 PM
The exact error would be helpful. If you don't own the file however, you won't be able to chmod it (see chmod for more info).
How exactly are you going about doing what you're trying to do? Are you creating a file with fopen(), writing to it, then trying to chmod() it all from php?
How exactly are you going about doing what you're trying to do? Are you creating a file with fopen(), writing to it, then trying to chmod() it all from php?
#3
Posted 04 March 2011 - 01:11 AM
<?php $fil = fopen('stevec.txt', r); $dat = fread($fil, filesize('stevec.txt')); echo $dat+11; fclose($fil); $fil = fopen('stevec.txt', w); fwrite($fil, $dat+11); fclose($fil); ?>
This is just a test code ... it works on one server, but it doesnt on the other where i cant chmod the file ...
I chmod the file via ftp program ... i upload the files and than when they are on server, i use same method everytime, i try to chmod it and i get this:
remote administrator : Cannot change attributes of remote files!
in filezilla : 500 'SITE CHMOD 777 stevec.txt': command not understood
Edited by HEki_, 04 March 2011 - 01:12 AM.
#4
Posted 04 March 2011 - 07:52 PM
So you upload all of the files, including stevec.txt, via the ftp program, and immediately after uploading them you try to chmod them via the ftp program? That should work. If it doesn't then i hope tech support gets back to you soon. You can try another FTP program, but that probably wouldn't change anything.
Have you tried search for the error you got on the Firezilla support forums? They may be quicker to reposnd than your servers tech support.
Have you tried search for the error you got on the Firezilla support forums? They may be quicker to reposnd than your servers tech support.
#5
Posted 05 March 2011 - 06:13 AM
OH,
i never thought of contacting filezilla support ... ill give that a try right now.
and yes, i uploaded all the files and after i tried to chmod the .txt ...
thx!
i never thought of contacting filezilla support ... ill give that a try right now.
and yes, i uploaded all the files and after i tried to chmod the .txt ...
thx!
#6
Posted 08 March 2011 - 10:51 PM
Where on your host is the file uploaded? In or below the web root or within a folder in the web root?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users