Re: "Permissions Denied" error as root: SOLVED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



R. G. Newbury wrote:
> R. G. Newbury wrote:
> To recap, attempting to run a script, as root, with permissions 755
> produced a 'Permissions denied' error.
> 
> The problem was that the partition was mounted with 'users,defaults'
> options, and 'users' implies 'noexec' and overrides 'defaults' (which
> implies 'exec'),
> 
> Changing the line in fstab to 'defaults' and quick 'umount' and 'mount'
> fixed the problem.

another trick is this:

mount -o remount /mount/point

will change the mount options without actually unmounting the device in
question.

> Weird bit is that I was logged in as root..WHICH WAS MISLEADING.

I am curious as to how you thought you had been misled... or was this an
assumption that there are absolutely no restrictions on what the root
user can do?

> 'nonexec' is set, ALL users are denied execution privileges. (This is
> most useful for security purposes in denying the use of programs on for
> example a USB stick from compromising the system.

There are other uses for it too.
It is not all that uncommon to have /tmp and /home (and other
mountpoints that should not really have executable files on them) mount
noexec as well.

> So, besides checking the permissions on a file, and the parent
> directories, you have to check how the partition was mounted.
> This will catch you when you are playing with something on a 'spare'
> partition. Or when you change the fstab without realizing the implications!

True. 'users' and 'user' are not default options and tbh I don't see the
point of using them most of the time. IMO the only devices that users
should be mounting/unmounting are physically removable devices.

> Thanks to all for the pointers, which gave the solution.

glad we could help :)


Stuart
-- 
Stuart Sears RHCA etc.
"It's today!" said Piglet.
"My favourite day," said Pooh.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux