LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-31-2016, 12:30 PM   #1
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Rep: Reputation: 40
File/Dir permissions - unable to remove files


This is a bit silly.
i have NFS mounted directory and i can not remove a certain directory there even as a root (local).
Local machine is "toshiba"

Code:
[root@toshiba ~]# id
uid=0(root) gid=0(root) groups=0(root)
[root@toshiba ~]# 
[root@toshiba ~]# 
[root@toshiba ~]# cd /home/az/Server_Videos/Movies/Hollywood/
[root@toshiba Hollywood]# ls -l ./Pirates\ of\ the\ Caribbean\ -\ Curse\ of\ the\ Black\ Pearl\ \(2003\)\ \[1080p\]
total 4288
-rw-r--r-- 1 az nfsnobody 2143097218 Nov  1  2015 Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.mp4.part
[root@toshiba Hollywood]# chown az:az ./Pirates\ of\ the\ Caribbean\ -\ Curse\ of\ the\ Black\ Pearl\ \(2003\)\ \[1080p\]
Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]/         Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]__GoaRvl/

[root@toshiba Hollywood]# chown az:az ./Pirates\ of\ the\ Caribbean\ -\ Curse\ of\ the\ Black\ Pearl\ \(2003\)\ \[1080p\]/*
chown: changing ownership of ‘./Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]/Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.mp4.part’: Operation not permitted
chown: changing ownership of ‘./Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]/Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.srt.part’: Operation not permitted
chown: changing ownership of ‘./Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]/WWW.YIFY-TORRENTS.COM.jpg’: Operation not permitted
[root@toshiba Hollywood]# chmod 777 ./Pirates\ of\ the\ Caribbean\ -\ Curse\ of\ the\ Black\ Pearl\ \(2003\)\ \[1080p\]/*
chmod: changing permissions of ‘./Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]/Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.mp4.part’: Operation not permitted
chmod: changing permissions of ‘./Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]/Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.srt.part’: Operation not permitted
chmod: changing permissions of ‘./Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]/WWW.YIFY-TORRENTS.COM.jpg’: Operation not permitted

[root@toshiba Hollywood]# su - az
[az@toshiba ~]$ cd /home/az/Server_Videos/Movies/Hollywood/Pirates\ of\ the\ Caribbean\ -\ Curse\ of\ the\ Black\ Pearl\ \(2003\)\ \[1080p\]
[az@toshiba Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]]$ ls -l
total 4288
-rw-r--r-- 1 az nfsnobody 2143097218 Nov  1  2015 Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.mp4.part
-rw-r--r-- 1 az nfsnobody     230822 Nov  1  2015 Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.srt.part
-rw-r--r-- 1 az nfsnobody     130677 Nov  1  2015 WWW.YIFY-TORRENTS.COM.jpg
[az@toshiba Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]]$ rm -rf ./*
rm: cannot remove ‘./Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.mp4.part’: Permission denied
rm: cannot remove ‘./Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.srt.part’: Permission denied
rm: cannot remove ‘./WWW.YIFY-TORRENTS.COM.jpg’: Permission denied
[az@toshiba Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]]$ ls -l ./
total 4288
-rw-r--r-- 1 az nfsnobody 2143097218 Nov  1  2015 Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.mp4.part
-rw-r--r-- 1 az nfsnobody     230822 Nov  1  2015 Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.srt.part
-rw-r--r-- 1 az nfsnobody     130677 Nov  1  2015 WWW.YIFY-TORRENTS.COM.jpg
[az@toshiba Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]]$ touch ./1
touch: cannot touch ‘./1’: Permission denied
[az@toshiba Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]]$ pwd
/home/az/Server_Videos/Movies/Hollywood/Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]
[az@toshiba Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]]$ cd ..
[az@toshiba Hollywood]$ ls -l ./
total 25563172
drwxr-xr-x 2 nfsnobody nfsnobody       4096 Jun 18 15:23 10 Cloverfield Lane 2016
-rw-r--r-- 1 az        nfsnobody 1573038607 Jan 12  2014 All.Is.Lost.2013.mkv
drwxr-xr-x 2 az        nfsnobody       4096 Nov  1  2015 Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]
drwx------ 3 nfsnobody nfsnobody       4096 Nov 21  2015 Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]__GoaRvl
drwxr-xr-x 2 az        nfsnobody       4096 Nov  1  2015 Pirates of the Caribbean - Dead Man's Chest (2006) [1080p]

[az@toshiba Hollywood]$ touch ./Pirates\ of\ the\ Caribbean\ -\ Curse\ of\ the\ Black\ Pearl\ \(2003\)\ \[1080p\]__GoaRvl/1
[az@toshiba Hollywood]$ touch ./Pirates\ of\ the\ Caribbean\ -\ Curse\ of\ the\ Black\ Pearl\ \(2003\)\ \[1080p\]/
Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.mp4.part
Pirates.of.the.Caribbean.Curse.of.the.Black.Pearl.2003.1080p.BrRip.x264.Deceit.YIFY.srt.part
WWW.YIFY-TORRENTS.COM.jpg
[az@toshiba Hollywood]$ touch ./Pirates\ of\ the\ Caribbean\ -\ Curse\ of\ the\ Black\ Pearl\ \(2003\)\ \[1080p\]/1
touch: cannot touch ‘./Pirates of the Caribbean - Curse of the Black Pearl (2003) [1080p]/1’: Permission denied
 
Old 07-31-2016, 12:48 PM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Well I just hope that none of the members here work for the MPAA or your country's equivalent thereof.

What are your mount options? Were you previously able to have write access to the disk and suddenly it doesn't work, or has it never worked as far as you know? Which of the two linux systems mentioned in your profile are you using?
 
1 members found this post helpful.
Old 07-31-2016, 12:59 PM   #3
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
root is local account and has no business poking on remote shares, by default root has no rights on those shares.
 
1 members found this post helpful.
Old 08-02-2016, 02:51 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
yeah, nfs servers would normally set the root_squash option
https://en.wikipedia.org/wiki/Unix_security#Root_squash
 
Old 08-16-2016, 08:12 PM   #5
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by hydrurga View Post
Well I just hope that none of the members here work for the MPAA or your country's equivalent thereof.

What are your mount options? Were you previously able to have write access to the disk and suddenly it doesn't work, or has it never worked as far as you know? Which of the two linux systems mentioned in your profile are you using?

Sorry about not providing the requested details - had a perfect storm of sorts.

i have other directories that i can remove/add, but this one. i'm not sure since when this ( inability to modify) started.
on the client (fedora 22 ) mount options are :
Code:
nfsvers=4,_netdev,defaults,bg,user,auto,noatime,intr 0 0
on the server /etc/exports:
Code:
/mnt/storage/Video 192.168.1.201(rw,async,all_squash) 192.168.1.112(rw,async,all_squash) 192.168.1.104(rw,async,all_squash)
where "toshiba" has an 201 ip.
 
Old 08-16-2016, 08:18 PM   #6
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
oh.... i should have not been doing anything after 22:00 - old man should rest.
why in the universe would i use client's "root" account against nfs mount?? - go sleep oldy.

Sorry about wasting space and your time. @Emerson - thank you for making me look at my posted log.
 
  


Reply



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
Rename all files in dir to remove first nine characters zappadragon Linux - Newbie 4 11-13-2011 06:00 AM
Remove Certain Files/Dir from Large Dir thomas.beaver Linux - Newbie 2 01-27-2008 08:47 AM
remove some files from a dir wkwireless Linux - Software 5 01-24-2007 07:49 AM
Compress dir keep file/dir permissions powadha Linux - General 1 11-14-2006 07:07 PM
I can't remove file or dir canay Linux - Newbie 2 01-19-2002 06:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:57 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration