Link to home
Create AccountLog in
Linux

Linux

--

Questions

--

Followers

Top Experts

Avatar of someITGuy
someITGuy

Getting chown: changing ownership of `test.txt': Operation not permitted
I have a linux box that has a NFS mount, I have set the permissions on my NAS to give all full permissions for my NFS exported filesystem.

When I try to create a file from the linux side on my NFS mount I get an error:


 touch test3.txt
touch: creating `test3.txt': Permission denied


When i try to do a chmod on the the NFS mount I get this error:

 chmod 777 mynas
chmod: changing permissions of `mynas': Operation not permitted

When i try to do a chown on the the NFS mount I get this error:

Getting chown: changing ownership of `test.txt': Operation not permitted

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of TintinTintin

Are you doing the operations as root?

Is the NFS mount read-only?


Avatar of someITGuysomeITGuy

ASKER

I am root

No, the NFS mount allows read/write from the servers subnet.

What is the output of

mount

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of woolmilkporcwoolmilkporc🇩🇪

You must specify "no_root_squash" when exporting the filesystem on the NAS box, otherwise root will be denied write access to the share.

wmp

mount
/dev/hda2 on / type ext2 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext2 (rw)
none on /dev/shm type tmpfs (rw)
/dev/hda5 on /usr2 type ext2 (rw)
10.0.0.231:/TeleInfoBackups on /mnt/mynas type nfs (rw,addr=10.0.0.231)

I exported the NFS filesystem via EMC's Celerra Manager, under Host Access I have the IP of the box I am writing from in the "Read/Write Hosts" field & in the "Root Hosts" field.

That should give it enough permissions...

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of woolmilkporcwoolmilkporc🇩🇪

What do you get with

showmount -e 10.0.0.231

issued from Linux?



showmount -e 10.0.0.231
Export list for 10.0.0.231:
/TeleInfoBackups (everyone)


Ok, I ended up deleting the NFS Export & the Filesystem on the NAS & recreating it from scratch, I now get this on the showmount -e command:


 showmount -e 10.0.0.231
Export list for 10.0.0.231:
/TeleInfoBackups 10.0.0.0/255.255.0.0,10.0.0.0/255.255.0.0

And, better still I can now create a file in the NFS mounted directory.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


ASKER CERTIFIED SOLUTION
Avatar of woolmilkporcwoolmilkporc🇩🇪

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of woolmilkporcwoolmilkporc🇩🇪

The first "showmount" output seems to indicate that your entries in "Read/Write Hosts" and "Root Hosts"
hadn't been correctly activated in the Celerra box, because it shows "everyone" instead of actual host addresses (as in your second output).

wmp
Linux

Linux

--

Questions

--

Followers

Top Experts

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.