DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-11-16 09:10:32

fickle
Member
From: Melbourne, Australia
Registered: 2007-09-10
Posts: 249

can read, but not write

hi all,

odd thing out of nowhere today is that i suddenly do not have permissions to add files to my 323.

my fun_plug works and telneted into the box and did

chmod -R +rw /mnt/HD_a2/

however, that did not work

and yes, i have checked whether my username does exist (though i have not touched this 323 config wise in a LONG time) .. and yes, my username exists within this device.

can anyone else advise what else i may be able to do in order to get write privs again?


oh, odd thing to, is why cant i log in as admin in an ftp program (FlashFXP) for example? all programs thus far hangs once the username ... admin .. is used

cheers

Offline

 

#2 2008-11-16 12:48:44

silversurfer
Member
Registered: 2008-07-20
Posts: 95

Re: can read, but not write

Samba has its own set of permissions. So even if your user has write access on the ext2 file system Samba can have a folder exported as "readonly". I would suggest checking you Samba configuration on the web page of the 323.
Instead you could take a look into "/etc/samba/smb.conf" which is the config file for Samba. If you are not familiar with the options in the config file try "man smb.conf".

Offline

 

#3 2008-11-17 12:32:08

fickle
Member
From: Melbourne, Australia
Registered: 2007-09-10
Posts: 249

Re: can read, but not write

well, i have checked the page ..ipof323/web/advanced/ and i have it set for ALL users to have +RW from root .. also check FTP config and again, all users have +RW access from root as well

i have tried telnetting via what you stated .. man smb.conf .. but i get

mnt/HD_a2/fun_plug.d/bin/sh: man: not found

did i miss a step somewhere? i only have fun_plug installed (BusyBox v1.8.1 (2007-11-20 23:39:08 CET) built-in shell (ash))

cheers

Offline

 

#4 2008-11-17 12:36:24

fickle
Member
From: Melbourne, Australia
Registered: 2007-09-10
Posts: 249

Re: can read, but not write

ahh.. i just tried going to this .. .http://192.168.0.30//etc/samba/smb.conf .. and got the following

======

[ global ]
interfaces = egiga0
unix charset = UTF8
workgroup = workgroup
netbios name = VAN-NAS01
server string = DNS-323
hosts allow =
hosts deny =
security = SHARE
encrypt passwords = yes
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
max xmit = 65535
create mask = 0777
directory mask  = 0777
force create mode = 0777
force directory mode = 0777
load printers = Yes
printcap name = /usr/local/LPRng/etc/printcap
min print space = 2000
max print jobs = 1000
printing = lprng
print command = /usr/local/LPRng/bin/lpr -P%p -r %s
lpq command = /usr/local/LPRng/bin/lpq -P%p
lprm command = /usr/local/LPRng/bin/lprm -P%p %j
lppause command = /usr/local/LPRng/sbin/lpc hold %p %j
lpresume command = /usr/local/LPRng/sbin/lpc release %p %j
queuepause command = /usr/local/LPRng/sbin/lpc -P%p stop
queueresume command = /usr/local/LPRng/sbin/lpc -P%p start
use sendfile =yes


[ web_page ]
comment = Enter Our Web Page Setting
path = /mnt/web_page
valid users =
read only = yes
guest ok = yes

[printers]
path = /mnt/HD_a4/.lpd
guest ok = Yes
printable = Yes
use client driver = Yes
browseable = No

[ BT ]
comment =
path = /mnt/HD_a2/BT
valid users =
read only = no
guest ok = yes
oplocks = no
map archive = no

[ Volume_1 ]
comment =
path = /mnt/HD_a2
valid users =
read only = no
guest ok = yes
oplocks = yes
map archive = yes

[ Volume_1-1 ]
comment =
path = /mnt/HD_a2
valid users = user1
read only = no
guest ok = no
oplocks =  yes
map archive = yes

[ Volume_2 ]
comment =
path = /mnt/HD_b2
valid users =
read only = no
guest ok = yes
oplocks = yes
map archive = yes

[ Volume_1-2 ]
comment =
path = /mnt/HD_a2
valid users = user1 user2
read only = no
guest ok = no
oplocks =  yes
map archive = yes

==========

from what i can see, it seems user1 has no access to Volume_1 whatsoever ... i will see if i can remove and add user again and see how that goes

Offline

 

#5 2008-11-17 12:49:05

fickle
Member
From: Melbourne, Australia
Registered: 2007-09-10
Posts: 249

Re: can read, but not write

just an updated.. i removed all users .. all groups .. recreated new ones .. gave everyone write permission from root via web admin pages .. .. still on the network share though, i am getting access denied trying to create new folders .. i can SEE EVERYTHING.. i just cant write still

any advise?

Offline

 

#6 2008-11-19 22:53:02

silversurfer
Member
Registered: 2008-07-20
Posts: 95

Re: can read, but not write

Your samba config looks fine to me. So I guess the problem must be related to file system permissions. Did you check that your user has write access to the folder that you are exporting via samba?

example:

Your smb.conf file shows that you export /mnt/HD_a2.

If you do a "ls -l /mnt" it should show something like this:

root@nas:/mnt# ls -l /mnt
drwxrwxrwx    6 root     root         4096 Nov 19 19:09 HD_a2
drwxrwxrwx    4 root     root         1024 Nov 12 11:46 HD_a4
drwxrwxrwx    6 root     root         4096 Nov  2 14:21 HD_b2
drwxrwxrwx    4 root     root         1024 Nov 12 11:46 HD_b4
drwxr-xr-x    2 root     root         1024 Aug 22 05:28 web_page

The permissions here show what owner/group/others are allowed to do inside the folder, so if you get an output like this (check the "others" column):

root@nas:/mnt# ls -l /mnt
drwxrwxr-x    6 root     root         4096 Nov 19 19:09 HD_a2
drwxrwxr-x    4 root     root         1024 Nov 12 11:46 HD_a4
drwxrwxr-x    6 root     root         4096 Nov  2 14:21 HD_b2
drwxrwxr-x    4 root     root         1024 Nov 12 11:46 HD_b4
drwxr-xr-x    2 root     root         1024 Aug 22 05:28 web_page

then nobody except the root user or someone belonging to the root group can create a file or directory directly below /mnt/HD_a2/


I looked at your initial post again and found a little typo. "chmod -R +rw /mnt/HD_a2/" is not going to do anything because you didn't specify whom to apply these permissions to.
"chmod -R a+rw /mnt/HD_a2/" will work better if you want to give everybody full access.

Last edited by silversurfer (2008-11-19 22:56:26)

Offline

 

#7 2008-11-19 23:04:13

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: can read, but not write

you need execute rights on a directory to changed into it. maybe this could be the problem.

@silversurfer using +rw means ?+rw.

Offline

 

#8 2008-11-20 00:15:23

silversurfer
Member
Registered: 2008-07-20
Posts: 95

Re: can read, but not write

oxygen wrote:

@silversurfer using +rw means ?+rw.

Thanks for the hint. I looked at the manpage of chmod and it says that if you don't specify user, group, others or all (like "+rw") then chmod will behave like you specified "a" (like "a+rw") but it will not change bits which are set in the umask. On my CH3SNAS the umask for the user "root" (and probably all others) is set to "022".

That means that if you run "chmod +rw bigfile" where "bigfile" has r-xr-xr-x permission set, it will only set it to "rwxr-xr-x" because the last two "w" are masked out.

Offline

 

#9 2008-11-20 23:34:29

fickle
Member
From: Melbourne, Australia
Registered: 2007-09-10
Posts: 249

Re: can read, but not write

thanks guys, i will do the "chmod -R a+rw /mnt/HD_a2/" as suggested above and advise how that goes

cheers

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB