Permission denied when moving files

Asked by decoherence

I'm curious about the current status of Nautilus and PolicyKit integration but I haven't been able to find much recent information. Is this still being worked on? If so, where can I find more information?

The functionality I'm looking for is, for instance, the ability to drag and drop web pages from my home folder to /var/www and get a prompt for an admin password rather than a permission denied error.

I know about gksudo nautilus. I'm just looking for some more recent info on nautilus/PolicyKit.

thank you!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu nautilus Edit question
Assignee:
No assignee Edit question
Solved by:
decoherence
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

you need to run nautilus like so:

gksudo nautilus

The folder is not owned by the user:

can you provide

ls -l /var/www

Revision history for this message
Fethi DILMI (addictcook) said :
#2

================
IMPORTANT , READ IT ALL
================

Of course you are not authorized , you are not the administrator on this computer and you are not the only user , there is the administrator, and we call it the "root" user. It is the Only one who have the full control on your PC.

I'll explain somethings to you than I'll tell you how to have the access on that folder. When you install Ubuntu , the user you create is the friend of root , but it doesn't have the root privileges. Root is the only user who can make critical actions on the system like update (or upgrade) , modifying partitions, thats why when you try to do these actions a password is required . Being the root's friend , the password you have chosen during the installation process is somehow you can say the root's password. Now you tell me why I don't access to root from the GDM, in fact you can't , because the root user doesn't exist under Ubuntu , you can say it is VIRTUAL.

Now let's go back to the folder where you want to paste the fonts. Let's before a little check , Right Click on the Folder, click then on Properties , then go to Permissions; You'll see that this folder is owned by root. So you must access as root to it , a password is required , but you tell where is the password , nautilus doesn't give me access to the password box? You have 2 methods:

===========================================================
1- Method 1: Type this command in Terminal:
===========================================================
[CODE]
sudo nautilus
[CODE]
... A password is required ; Type your password and go to the folder you want and paste the Files.
===========================================================

===========================================================
2- Method 2: If you use Jaunty, Right Click the folder you want to access , then click "Open As Administrator". Type the password and do what you want.
===========================================================

===========================================================
3-
... and the most secure method:
Go to "/home/<USERNAME>/" and create this folder: .fonts (The point before is required)
and paste the fonts here.
===========================================================

This is what we call Permissions. I hope you have understood , because everything under Linux is secured because of this.

Good Luck.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Method 1 is WRONG

DO NOT RUN NAUTILUS WITH SUDO!!!!

I am tired of having to get people unstuck when they have read misinformation regarding sudo.

sudo is for command line apps ONLY.

command line apps include (but are not isolated to):
cp, mv, rm, apt-get, ln, cat

the command GKSUDO (for gnome) and KDESUDO (for KDE) are used to run GUI apps

These include (but are not isolated to)
nautilus, gedit, kate, konqueror, dolphin, mousepad, kolourpaint

if you run GUI apps with sudo you will ruin file and folder ownerships. This is because sudo does not setup the environment for GUI apps correctly. This is why both exist

If you want a classic example of what will happen I suggest you read this post. I had to work with this guy to get his system righted and I purposefully keep this link in my favourites to educate people who start telling people how to break their systems with sudo nautilus and sudo gedit

https://answers.launchpad.net/ubuntu/+source/azureus/+question/72151

Thanks

Revision history for this message
decoherence (totalmassretain) said :
#4

I'll try to track down more information upstream.

Sorry if this question (which was not of a technical nature; i know about gksu and permissions) was inappropriate for this forum. I was just looking for a lead on the particular subject of PolicyKit/Nautilus.

Thank you for taking the time to reply,

Revision history for this message
Michael (michaeljt) said :
#5

Did anything come of this? I am thinking of opening an upstream feature request for this, though ideally it shouldn't just be nautilus, but all applicable GNOME applications (file roller for instance). (Obviously I am refering to the original question, not all the suggestions involving various forms of sudo.)