chmod 777 files - connecting to router - cant chmod folder

dibbers

Premium Member
Premium Member
Joined
May 18, 2005
Messages
11,797
Reaction score
1,387
Location
Ipswhich
thought i had it...lol....i'm trying to get to the root of my router which i can connect to and that using keys blah blah...when i get connected i see the folder that i want to change the rights from 755 to 777 etc but it's not allowing me.

i enabled sshd and have password enabled (in router).....which is root / admin

then i get a pop up with the following....

Command 'groups'
failed with return code 127 and error message


then

Command 'pwd'
failed with return code 0 and error message
-sh: groups: not found.


then it lets me connect and i can look around the folders......


--------------------------------------------------------------------------
WinSCP Version 4.2.1 (Build 428) (OS 5.1.2600 Service Pack 3)
Login time: 26 August 2009 22:37:22
--------------------------------------------------------------------------
Session name: dual wan
Host name: 192.168.1.1 (Port: 22)
User name: root (Password: Yes, Key file: No)
Tunnel: No
Transfer Protocol: SCP
Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
Proxy: none
SSH protocol version: 2; Compression: No
Bypass authentication: No
Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
SSH Bugs: -,-,-,-,-,-,-,-,-
SFTP Bugs: -,-
Return code variable: Autodetect; Lookup user groups: Yes
Shell: default, EOL: 0
Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
Local directory: default, Remote directory: home, Update: No, Cache: Yes
Cache directory changes: Yes, Permanent: Yes
DST mode: 1
--------------------------------------------------------------------------
Looking up host "192.168.1.1"
Connecting to 192.168.1.1 port 22
Server version: SSH-2.0-dropbear_0.48
Using SSH protocol version 2
We claim version: SSH-2.0-WinSCP_release_4.2.1
Using Diffie-Hellman with standard group "group1"
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-rsa 1040 e2:36:3f:e7:bb:3d:c4:33:64:04:86:6e:c1:f7:37:e1
Initialised AES-256 CBC client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 CBC server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "root".
Prompt (6, SSH password, , &Password: )
Using stored password.
Sent password
Access granted
Opened channel for session
Started a shell/command





i can change a file but not a folder.......i get these error mesages

when trying to chmod the folder.....

Command 'chgrp -R "root" "jffs"'
failed with return code 1 and error message
 
Last edited:
hi chmod = change mode is a file command not a folder command;
777 = read, write, execute therefore a folder cannot have these properties
also these are unix commands so does your ftp client have the ability to edit unix

The first number stands for "user", the second number stands for "group" and the final number stands for "other". There are three possible things that can be done with a file: read, write, and execute.. Here is a little reference:

execute = 001 in binary = 1 in octal
write = 010 in binary = 2 in octal
read = 100 in binary = 4 in octal

read write execute = 111 = 1 + 2 + 4 = 7
read write no execute = 110 = 4 + 2 = 6
read no write execute = 101 = 4 + 1 = 5
read no write no execute = 100 = 4
no read write execute = 011 = 2 + 1 = 3
no read write no execute = 010 = 2
no read no write execute = 001 = 1
no read no write no execute = 000 = 0

chmod 777 filename.ext

edogg
 
Last edited:
chgrg, chown etc will work on directories as well as files (although the meaning of the bits is slightly different.) I'm not understanding why you want to change permissions anyway. If you're logged in as root, (uid 0) then you'll be able to see everything anyway. Certainly in OpenWRT, everything runs as root anyway, so you wouldn't need to change anything (security wise it's not good, but it should be okay on a small router).

Can you post a link to the guide you're following, 'cause without it it's difficult to help.

Cheers

Beady.

edit. Also, you don't need the quotes around root and jffs.
 
thanks chaps this is the guide that i'm following

run WinSCP from the dual wan kit and log into router
b. make a new folder called "scripts" in the "jffs" folder. should look like this

scripts.jpg


c. transfer the scripts included with the kit into the "scripts" folder

d. transfer the iptables file into the jffs folder using "binary" transfer method

e. right click the jffs folder & select properties. copy this configuration

jffs.jpg
 
i'll double check but the thing that i need to get past 1st i guess are the errors when i first connect which is probably why i can't change atrributes etc....

When connecting.........

Command 'groups'
failed with return code 127 and error message

then

Command 'pwd'
failed with return code 0 and error message
-sh: groups: not found.


will double check when i get home.!
 
Back
Top