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-01-14 23:19:04

orhor
Member
Registered: 2008-06-08
Posts: 20

lama question about user permissions

hi, i would need your help:

I am connected to DNS via SSH as root. I create a dir and chmod it to 700. so its:
drwx------    2 root     root         4096 Jan 14 22:11 aaa

i would expect that only user root can read, write or execute this dir.

I connect via win explorer to shared folder as DNS's user which have readWrite permissions and I am able to delete that 'aaa' directory.

How is this possible?

Sorry for that question, Im completely new to Linux, but I would like to get some new knoledge.

Thank you

Offline

 

#2 2009-01-16 19:08:19

orhor
Member
Registered: 2008-06-08
Posts: 20

Re: lama question about user permissions

I thought it'll be easy question, or is it 'too much lama's' smile ?

i played with permissions a little, but the problem still persits. as a user connected from windows i am able to delete the files created by root via ssh-putty with touch command.

thank you in advance

Last edited by orhor (2009-01-16 19:10:19)

Offline

 

#3 2009-01-16 19:36:55

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: lama question about user permissions

Ok - I'll bite - when you connect from Windows, what authority does the user have?

Offline

 

#4 2009-01-16 20:38:20

duhblow7
Member
Registered: 2008-05-29
Posts: 18

Re: lama question about user permissions

When you connect via Win Explorer you are connecting using SMB protocol.  The DNS-323 serves SMB by running the samba daemon.  Samba runs as root, however it defines the permissions in /etc/samba/smb.conf.  Paste the bottom part of that file that shows the section for the share.  You'll likely see a line that says read only = no or maybe a valid user defined.

Offline

 

#5 2009-01-16 21:04:27

orhor
Member
Registered: 2008-06-08
Posts: 20

Re: lama question about user permissions

thank you very much for quick answers. I'll study a bit about smb.conf. That's what I needed to be pointed at.

this forum is a good place.

Offline

 

#6 2009-01-17 01:06:34

orhor
Member
Registered: 2008-06-08
Posts: 20

Re: lama question about user permissions

i tried to edit smb.conf. I renamed the original smb.conf to smb.confORIG and copied my modified smb.conf into /etc/samba. I restarted DNS-323 and the smb.confORIG was gone and smb.conf was in the original state before I made any changes.

is the copy of smb.conf stored somewhere? does samba do some anti changes checking?

thank you for answers in advance

Offline

 

#7 2009-01-17 01:11:48

blahsome
Member
Registered: 2008-03-02
Posts: 157

Re: lama question about user permissions

orhor wrote:

i tried to edit smb.conf. I renamed the original smb.conf to smb.confORIG and copied my modified smb.conf into /etc/samba. I restarted DNS-323 and the smb.confORIG was gone and smb.conf was in the original state before I made any changes.

is the copy of smb.conf stored somewhere? does samba do some anti changes checking?

thank you for answers in advance

Upon reboot, the DNS-323 copies the cmb.conf from onboard flash to /etc/samba.

Offline

 

#8 2009-01-17 16:54:13

orhor
Member
Registered: 2008-06-08
Posts: 20

Re: lama question about user permissions

thanks.

so I'll ask another question.
Is there a way to achieve following state on DNS-323?

I have two Windows accounts John and Mary.

I woud need to be able to set permissions on DNS-323  to allow John to do anything and to allow Mary read and execute but not modify or delete yet existing files or dirs, and concurrently allow Mary to create and modify her own dirs and files.

or another scenario: allow Mary only read and execute, but have created a special Mary's dir where she would be able do anything

thank you in advance.

Offline

 

#9 2009-01-17 22:24:37

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: lama question about user permissions

orhor wrote:

is the copy of smb.conf stored somewhere? does samba do some anti changes checking?

See: http://dns323.kood.org/forum/t1232-wher … ed%3F.html

Last edited by mig (2009-01-17 22:25:02)


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB