Hello !
I have a simple script below - This script will make a folder and create 1 file.txt inside - The problem is: how come I cannot use CuteFTP to delete this file.txt (get 550 file.txt: Permission denied)
Here is my script :
#!/usr/bin/perl
# main folder was chmoded 777 by using CuteFTP
$dir = "/home/hwa/public_html/main" ;
# Make new dir "abc" and chmod 777 abc
mkdir ("$dir/abc", 0777);
open (FILE, ">$dir/abc/file\.txt");
print FILE "Something here\n";
close (FILE);
chdir "$dir/abc";
chmod 0777, 'file.txt';
print "Content-type: text/html\n\n";
print "DONE\n";
File file.txt was created OK - But now when I use CuteFTP and want to delete this file - I cannot do it - Please tell me why and how can I delete this file.
Oh, I have tried to remove the code below out of the script but it won't help.
chdir "$dir/abc";
chmod 0777, 'file.txt';
Something strange here : I've tested this script on 2 server. One server I can delete file.txt but the other won't allow me to do it.
Hope you understand what I mean and help me out !
Thanks a lot !
N.A
I have a simple script below - This script will make a folder and create 1 file.txt inside - The problem is: how come I cannot use CuteFTP to delete this file.txt (get 550 file.txt: Permission denied)
Here is my script :
#!/usr/bin/perl
# main folder was chmoded 777 by using CuteFTP
$dir = "/home/hwa/public_html/main" ;
# Make new dir "abc" and chmod 777 abc
mkdir ("$dir/abc", 0777);
open (FILE, ">$dir/abc/file\.txt");
print FILE "Something here\n";
close (FILE);
chdir "$dir/abc";
chmod 0777, 'file.txt';
print "Content-type: text/html\n\n";
print "DONE\n";
File file.txt was created OK - But now when I use CuteFTP and want to delete this file - I cannot do it - Please tell me why and how can I delete this file.
Oh, I have tried to remove the code below out of the script but it won't help.
chdir "$dir/abc";
chmod 0777, 'file.txt';
Something strange here : I've tested this script on 2 server. One server I can delete file.txt but the other won't allow me to do it.
Hope you understand what I mean and help me out !
Thanks a lot !
N.A