NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Network and Storage Protocols

fas2020: CIFS share, Linux mount.cifs, chown, "permission denied"?

karstenrink
5,965 Views

Folks;

not sure whether this is a question that really belongs here and/or a question related to NetApp or rather the Linux mount.cifs utility: Does someone around here have any experience mounting CIFS shares provided by a NetApp Filer (FAS 2020 in our case) on Linux hosts? For what I see, most of the file system functionality works pretty well, except for one thing: Trying to do chmod or chown on any files on the mounted CIFS share reliably ends up in a "permission denied" as soon as the user trying to do so is anyone else but root.

Played around with various combinations of mounting as root and/or explicitely assigning (uid=, gid=) the share content to belong to some dedicated user, this didn't really change much. Reading the manual page of mount.cifs, I learnt that, due to CIFS nature, chmod and chown will always succeed yet not do anything meaningful - which obviously is not the case on our system. Am I missing something in that? Or is this just the way things should be?


TIA for any input on that!

Cheers,

Kristian

2 REPLIES 2

aborzenkov
5,965 Views

Chown is generally restricted to root only for security reasons. It happens even before kernel knows about type of file system involved.

For chmod I am not sure. Usually I do not use CIFS between two systems that both can use NFS ☺

karstenrink
5,965 Views

You're right about chown, I should have been more careful, thanks. Yet in our case, as most of the desktop systems use win32 and most of the servers use CIFS, so far we have had a pretty pleasant time using CIFS mount on Linux machines. However, as part of our (proprietary) backend system does get off track due to the "permission denied" returned by chmod, I wanted to get rid of this somehow.

Anyway, thanks for your time and response, much appreciated.

K.

Public