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 2009-09-15 14:33:46

jti
Member
Registered: 2009-09-15
Posts: 5

DNS323 FTP or Network shares transfers... always rwxrwxrwx (writable!)

1) Thanks for the fun-plug add ! Great to be able to 'telnet in the DNS-323!...
2) Painful concern : Either through 'network sharing' or 'FTP' (through DNS-323 web interface),
all the directories or files created are always -rwxrwxrwx (which means they are writable,
updatable, deletable by anyone)... Is there anything I missed ?
I can set a new user, (e.g. 'john', member of group 'phototheque') and upload a directory 'test':
It works fine and the TELNET session tells me :

drwxrwxrwx      john   phototheq    test

... which means the right user:group is used.
But always, you can notice the '-rwxrwxrwx' ... (writable by anyone) ????


I noticed, in he DNS323 manual,  that access to ALL R/W is configured by default... OK
and that you have to delete it to set restricted accesses.... OK, I did so...
But it doesn't change the DNS323 behaviour : all file transfers are
systematically 'writable by anyone'.

Any idea ?
Thanks in advance : You imagine we can't rely on a backup-solution
where everything can be erased by anybody ....

     Jean

Offline

 

#2 2009-09-15 17:53:05

jti
Member
Registered: 2009-09-15
Posts: 5

Re: DNS323 FTP or Network shares transfers... always rwxrwxrwx (writable!)

I tried to modify /etc/samba/smb.conf
and change the lines :
create mask = 0777
directory mask  = 0777
force create mode = 0777
force directory mode = 0777

to these new
create mask = 0770
directory mask  = 0770
force create mode = 0770
force directory mode = 0770

Then reboot the DNS-323
... but when the DNS-323 reboots
the original values (0777) are back again ...

Does anyone know how to fix the 'folder/files creation permissions to '0770'
(R/W for user, R/W for group, none for other) ?

Offline

 

#3 2009-09-15 18:11:32

jti
Member
Registered: 2009-09-15
Posts: 5

Re: DNS323 FTP or Network shares transfers... always rwxrwxrwx (writable!)

... Then I tried to change
/default/smb.default
(idem : change 0777 permissions to 0770)

but once again, these changes are overridden at reboot.
Where is the linux kernel loaded from ?

Offline

 

#4 2009-09-15 18:44:50

jti
Member
Registered: 2009-09-15
Posts: 5

Re: DNS323 FTP or Network shares transfers... always rwxrwxrwx (writable!)

Got it folks !...

Thanks to BertrandD note in
> DSM-G600 discussion > ftpaccess restores...

Here's the way to write in the FLASH MEMORY
and then change the default kernel loaded values

#cd /
#mount /sys/mtd1     #mounts flash-memory
#vi /sys/mtd1/smb.default  #edit the flash-memory smb.default
(once again : change the 0777 permissions to 0770 ... Then save the file)
#umount /sys/mtd1  #umount flash-memory
#reboot   # reboot the DNS-323

Then, after reboot, you get the right /etc/samba/smb.conf file
(permissions changed to 0770)

Fine !
Would like one of you, gurus, to confirm the validity of this operation.
Any way, it works:

Now, when I create a new directory (through network-share),
the permissions are 0770, that is :
o No authorization, except for the 'user' and 'group' members.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB