LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2014, 08:25 AM   #1
charlemagne-is-my-son
Member
 
Registered: Dec 2012
Location: Shanghai
Distribution: Xubuntu, 14.04
Posts: 54

Rep: Reputation: Disabled
'sudo chown root file.txt' is inconsistent in leading to a "permission denied" output


Xubuntu 14.04

I tried to 'sudo chown root' a file, and double-clicking it resulted in a "permission denied" output. I tried it again with another file, but this time nothing happened. I could click and open the file as if I had never issued the command.

A related problem is when I issue this command at directories. It takes on the x on the folder in nautilus, but I can open the directory without getting the "permission denied" warning. I don't want the directory to be openable from nautilus at all, and I'd like it to require the root password if access is attempted through terminal.

Thanks very much
Matt

Last edited by charlemagne-is-my-son; 11-09-2014 at 08:26 AM.
 
Old 11-09-2014, 08:47 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Chances are the file/dir still has read permission for "other", and/or it still belongs to a group that your user is a member of which has read permission. Instead of "chown root file", use "chown root:root file", that will change both the owner and the group to root. Next use "chmod o-rwx file" to remove read, write, and execute permission for others.
 
  


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
how to fix "sudo: unable to execute /bin/ls: Permission denied"? nagendrar Linux - Newbie 12 09-14-2012 06:55 AM
[SOLVED] Getting permission denied when running "sudo bash" Clariollo Red Hat 6 01-25-2012 02:18 PM
"sudo mount -a" works perfect but permission denied when mounting on startup, why? aaron4katie Linux - Software 10 01-11-2007 10:16 AM
can't set leading "s" in file permission toddcurry Linux - General 2 10-19-2006 05:34 PM
Permission Denied when trying as "root" to edit xorg.conf d3g@ Linux - Newbie 4 09-07-2006 05:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:56 PM.

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