LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-06-2010, 09:13 AM   #1
jsaumer
LQ Newbie
 
Registered: Jan 2010
Posts: 4

Rep: Reputation: 0
CIFS Issues


Hello,

I have a CIFS share on a NAS made by Ciprico (which no longer exists)

All of the files before a certain date cannot be deleted. On a windows machine, you can delete the file, no error messages, and if you refresh, the file is back.

The files that cannot be deleted, have the permissions of:

-rwxrw-rw- 1 nfsnobody nfsnobody 3332987 Sep 29 2008 <filename>

All of the new files we put on the NAS can be deleted and have the permissions of:

-rwxrw-rw- 1 guest guest 27292 Oct 22 12:16 <filename>

Is there a easy way to fix this issue?


Thank you in advance,
jsaumer
 
Old 01-06-2010, 09:48 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
the owner/group nfsnobody seems to imply an nfs share rather than a cifs one.
http://www.troubleshooters.com/linux/nfs.htm

nfsnobody is the nfs server equiv of root - this is part of a feature called root squashing.
basically you need to be root on the server - user=nfsnobody or use the export cammand to disable this. Never seen this used on a nas though.
 
Old 01-06-2010, 10:53 AM   #3
jsaumer
LQ Newbie
 
Registered: Jan 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Is there a way for me to change the permissions on all of the files that have nfsnobody into something useful like the guest one that is listed?

Or is there something I can modify so files can be deleted that have the nfsnobody owner?
 
Old 01-06-2010, 12:03 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
One thing to look at is the ownership of the directory being shared. Another thing is what these files are. A file named aquota.user for example is used by the system to administer quotas. Such a file may be recreated by the kernel, so it is a new file by the same name which is created.

It is the ownership of the directory containing file that determines whether a file is deletable. A user with write access can delete files, unless the sticky bit is set on the directory. In that case, only the owner can delete files.

It seems that the NAS supports NFS. Try mounting the share on a Linux box and then delete the files as root. Root squashing changes the root user to "nfsnobody" who is the owner of the files, so deleting should be possible.

You can run "sudo /usr/sbin/showmount -d <nas ip address>" to list the directories nfs shares.
 
Old 01-06-2010, 06:00 PM   #5
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
Root squashing changes the root user to "nfsnobody" who is the owner of the files, so deleting should be possible.
I've been pondering this - it is root on the server that becomes nfsnobody, rood on a client is still root. The idea is that someone with local root access does not get to administer the nfs server.

http://www.troubleshooters.com/linux/nfs.htm
... discusses this and ways to get around it. I've never seen this on a nas before - presumably it is possible to log in to the server to configure it?

And yes, caution is advised in removing the server root users files - if you don't know how to act as the nas admin, then you should find somebody who does and ask them about it. They are clearly not put there by a guest. There are often good reasons for these files to stay where they are.
 
Old 01-07-2010, 08:16 AM   #6
jsaumer
LQ Newbie
 
Registered: Jan 2010
Posts: 4

Original Poster
Rep: Reputation: 0
These files were put on the appliance as a anonymous user just like the ones that are marked guest. Nothing changed in our infrastructure on how people put files on the appliance.

I do have root to the appliance via ssh and I can get any information you want.
 
Old 01-07-2010, 05:43 PM   #7
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Ok - since you can act as root on the server, you can export to a guest or just change the owner of the files.

It is unlikely that the files become owned by root when added by a guest user. Your observations suggest that someone is root when they are not supposed to be ... work out who put them there and under what conditions: try to duplicate the feat. It is technically possible that the owner/group got changed later - if they had the right owner when first uploaded - so you probably need to figure out how.
 
  


Reply

Tags
cifs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cifs "mount error 13 = Permission denied" CIFS SUCKS humbletech99 Linux - Networking 40 10-31-2012 08:50 AM
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 02:48 PM


All times are GMT -5. The time now is 01:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration