× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

ReadyNAS OS 6.5.1 edit SMB shared file permissions issue

ilansch
Aspirant

ReadyNAS OS 6.5.1 edit SMB shared file permissions issue

Hey, 

I have a ReadyNAS on VM (VM Virtual Platform)

It is ReadyNAS 6.5 OS (on debian) Linux nas 4.1.21.x86_64.1

PRETTY_NAME="ReadyNASOS 6.5.1"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"

 

I have loaded into the kernel a self made driver that monitor file operations, this means, when any user is doing operations on files, e.g open,read,change permissions, i get "event information " of the operation. The information i get is: UID and GID of user performed the operation, the file it performed the operation and the operation type.

Lets continue:

I have successfully shared a folder via SMB protocol and loaded my driver into the kernel.

From my Windows 2008R2 machine, I do "//readynas-ip/mysmb" and see the shared files (SMB).

When any user perform operations on files, i get a valid full data provided by my driver.

There is a problem when editing file permissions and the user is not the owner of the file.

In the Windows 2008R2, When the user edit file permissions (right click the file, Properties -> Security tab -> edit permissions) - There are 2 flows:

A user is changing file permissions - the user is the owner of the file.

A user is changing file permissions - the user is not the owner of the file.

 

When the user is the owner of the file, everything is ok, in the kernel driver, I see event notifying me the file permissions is changed, i get the uid/gid of that user that changed the permission.

if the user is NOT the owner of the file, when he changes a file permission, I see in my kernel driver that event, but my kernel driver informs me that the actual user who edited the security permission is 0 - meaning its a root user and not the actual user.

 

Why is that ? 

On the VFS Driver I loaded to kernel, I receive (on file attributes changes) UID 0 and GID 0 on file persmissions event. when the user is not set as File owner.

File persmission 

Thanks

Message 1 of 1
Top Contributors
Discussion stats
  • 0 replies
  • 2864 views
  • 0 kudos
  • 1 in conversation
Announcements