Error trying to Empty Trash

Hi,

Hoping someone can help me with a silly and annoying problem.

Version 11.2

Whenever i try to empty the Trash (As Root) it does so then gives me an error message saying that it can’t delete a specific file. It’s always the same file and it says:

“The file or folder /home/.Trash-0/files/yesterday once more.mp3 does not exist.”

Having looked in this location logged in as root using both Dolphin and at the command line, this file doesn’t exist.

Anything that is in Trash that i’m aware of gets deleted.

Any ideas as to how i can prevent this error message.

Thanks in advance.

Mark

empty the Trash (As Root)

Why as root?
Are you logged in as root?

Occasionally there are jobs that i have to do that can only be done logged in as root. Whilst logged in i occasionally delete huge amounts of unwanted MS Windows files from network shared locations.

i rarely log in as root and only when i have no choice, once a month.

Well I never login as root and have no trouble deleting files
Large amounts or big files should be deleted and not sent to trash.

Perhaps you need to work on your permissions so as to work as user and or use su - and rm if necessary

This is nonsense. Read SDB:Login as root - openSUSE.

akwe-xavante wrote:

> i rarely log in as root and only when i have no choice, once a month.

you always have a choice, it is just a matter of learning how to do
it the way that does not have you loggin into KDE/Gnome/etc as root

instead log in as yourself and then launch a filemanager with root
powers…there is usually one in the main menu, look for something
like: System > File Manager > File Manager - Super User Mode…

anyway, there should be no file in your home directory owned by root,
so it should be a piece of cake to empty your trash…


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

What if there were no hypothetical questions?

I don’t want to open another debate about doing things logged in as root or not. For me its easier and considerably faster to do what i want to do logged in as root for 10 mins once a month and even less often than that. I have logged in as little as 3, 4 times a year in the past at the Linux box that is.

All i would like is help with my problem and if someone can help me with it, i would be very grateful.

Thank you to those who have replied thus far, i’m sure your correct. I’m not an avid Linux user and i will never be.

As a new thread afterwards if someone can explain how i can copy several small blocks of different text from different MS Windows text files into different cgi, html files on the main apache server logged in as a user not root via a ssh session from a MS Windows computer using putty as the client just as quickly and as efficiently i will be grateful. To make silly alterations i’m currently logging in as a user then su from a remote MS Windows PC using putty then i can make changes to apache, samba or vsftpd config files and make simple alterations to the main servers cgi scripts and html files. To make multiple changes to several of these files sometimes including the addition of one or more virtual hosts and large blocks of text and code its easier to go the Linux box itself and login as root to get the job done fast and easily, it works for me, its fast and efficient and i can’t and don’t make mistakes (i often get my html code and scripts wrong, silly typo’s etc :slight_smile: ). Its then i may at the same time tidy things up and delete sometimes as much as 600GB of unwanted files. Doing this via a mapped drive on a Windows PC is very slow even on a giga ethernet network. Doing it via a putty session at the command prompt logged in as a user not root has in the past caused problems resulting in the re installation of Linux because i have made a typo probably. I don’t trust myself deleting / removing files at the command prompt. I’ve never made a mistake deleting files at the Linux box logged in as root, yet!!!

Nobody uses this Linux box for any reason whatsoever other than storing / moving around huge amounts of MS Windows data via mapped drives and installing MS Windows Service Packs and applications. This Linux Box has ftp, ssh, samba and apache servers running. Nobody ever logs in and uses it as a pc and only i can login and thats very rare.

Regards

Mark

My remarks are not to convince you to not log in in the GUI as root. After all it is your system and you can do as you think fit. But I can not leave a statement that suggest that loging in as root in the GUI is something that is needed go without comment. I want to avoid that anybody reading this thread believes that this is true, or a recommended way to do.

This is about others, not about you.

The problem is logging into a GUI as root. This can cause ownership problems in your home directory as you now see now. Working with MS files can add to the problems because MS ownership is, let us say, different from Linux ownership structures. Making a mistake as root can cause far far more damage then doing the same thing as a user.

In ~/.local/share/trash you will see to folders/directories it may be that the info files did not get removed because of ownership deleting what is in info should unblock trash.

Hello hcvv,

I know, i thank you for your advice but can you see whats happening, this thread is becoming a discussion about doing things logged in as root and its not helping me resolve my problem.

This thread has already been hijacked by a very different topic and my chances of resolving my problem destroyed.

I’m tempted to start another thread and try again.

Again thank you all for your help and comments, but can anybody help me with my error message and a non existent file in the Trash can.

Mark

Thank you gogalthorp, job done.

Many Thanks

Mark

Does someone want to help explain how i can edit root config files and apache’s main server’s cgi and html files, sometimes adding several blocks of code and text via a remote ssh session from a MS Windows PC using putty fast and efficiently.

If i have to go to the Linux box and login to a GUI as a user how do i do it? Not login as a user but how do i edit root files not logged in as root.

I don’t want to make these root config files, cgi and html files accessible to anybody.

Hello Mark,

Please next time state clear from the beginning that you know you are not working to best practices (to say the least), but that you do not recommend this to others. We do not want ppl to copy your way of working by innocence.

And help suggestions are still forthcoming, see post #9 above.

Henk

I do think think the link I provided gives enough possibilities (did you allready study it?): file manager in super user mode, several editors (according to desktop) in superuser mode), a terminal with su - and vi, many. You can use GUI tools (YaST is of course the example of such a thing on openSUSE), but you should not log in.

OK, Logged in as a user using the GUI, not root i can get a file manager as super user.

I can browse the file system as root but i am denied access when wanting to open and edit root files!?

I’ll try that one again, i get the error message Cannot launch Kwrite or whichever editor i choose i get the same message saying that the application cannot launch.

Hi Mark
Because your wanting to use GUI tools to do your editing, I suggest you install something like NX Server (from nomachine.com) on your server, then on the windows box install the client, this will give you remote access to a desktop. You could also look at running the server at runlevel 3 to save some resources as the GUI doesn’t need to be running if you use NX.

Then instead of using putty via ssh run NX via ssh and bring up a remote desktop where you could then use gnomesu, kdesu or xdg-su to admin the files as your user with root permissions.

You might also want to look at using a cron job to do maintenance if there are common tasks via a custom script and send you an email when it’s done.

For me that is a complete other way of working for a system manager. It is a normal way for an end-user. He/she clicks around, never knowing what is where.

In fact when I want to change * /etc/apache2/default-server.conf*, I start a terminal as superuser (there is an icon for that in Kmenu), type the root password and do

cd /etc/apache2
vi default-server.conf

using filename expansion this is not to difficult (and often quicker then launching a so called file manager and browsing there).
When you do not like* vi (which I can imagine), use the command icon and type kdesu kwrite *(in my system kwrite is even suggested. In Kwrite the Open gives you a browsing window and you can click through the directory tree.

When you want it it is not that difficult to adapt to another way of working. But again, I do NOT want to convert you, I want to protect others from a bad advice.

On Tue, 11 Jan 2011 19:06:01 +0000, gogalthorp wrote:

> The problem is logging into a GUI as root. This can cause ownership
> problems in your home directory as you now see now.

I’ve heard this claim several times, but I have to dispute it - if you
log in as root, then the file ownerships are in root’s home directory,
not any other users’ home directory.

I imagine any issues with rights would come with locks for the X
subsystem, things tracked in other parts of the system that a normal user
doesn’t have write rights to.

But I fail to see how anything in a user home directory gets messed up by
logging into the GUI as root. That would imply that Linux somehow
randomly picks a user’s home directory for storage of information.

About the only instance where I could see a root login messing with
anything in a home directory is if the user, for example, opens oocalc
and then navigates to the directory to modify a spreadsheet in the user
home directory.

But it isn’t going to mess with settings in /home/user1/.kde4 because a
root login will use /root/.kde4 as its location to store files.

Jim

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Tue, 11 Jan 2011 19:44:08 +0000, Jim Henderson wrote:

> I’ve heard this claim several times, but I have to dispute it

I should include the caveat that I’m not saying that it’s a good idea;
it’s not.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

akwe-xavante wrote:
> OK, Logged in as a user using the GUI, not root i can get a file manager
> as super user.
>
> I can browse the file system as root but i am denied access when
> wanting to open and edit root files!?
>
>
a super user/root powered file manager is still just a file
manager…you cannot open and modify files with a file manager…

so, use a root powered editor…i can not see where you have stated
which desktop environment you are using on your openSUSE 11.2, so i
give two examples, one for KDE and another for Gnome:

  1. kde
  • while logged into KDE as a simple user, open terminal
  • type

kdesu kwrite

  • a root powered kwrite will open, nav to the doc to edit and have a
    blast, when finished close kwrite and then the terminal
  1. gnome
  • while logged into gnome a simple user, open a terminal
  • type

gnomesu gedit

  • a root powered gedit will open, etc etc etc…

and, kdesu/gnomesu will work to launch any gui application with root
powers from a user terminal

and, depending on all the keyboard strangeness that might occur, you
can probably replace opening/closing the terminal by:

hold down left Alt key and press/release the F2 key…a “Run” popup
should appear…type the kdesu kwrite/gnomesu gedit into the line and
follow you nose…

btw, why not do all of the editing of the config files on your windows
box and then transport them into place on . . .


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

What if there were no hypothetical questions?

Jim Henderson wrote:

> About the only instance where I could see a root login messing with
> anything in a home directory is if the user, for example, opens oocalc
> and then navigates to

DON’T TRY THIS AT HOME: maybe an administrator logs into the GUI as
root, opens a file manager and nav to Jim’s users directory /home/jim/

and while looking around to make sure all is well, finds a file or
three with the wrong name and changes it, or moves files around in the
home from one directory to another, or sends some files to the trash
can with a right click, or drags them here or there…

when all is tidy he logs out as root and logs back in as Jim…bingo,
most likely you cannot log in…i admit, sometimes you can log in,
sometime the /home/jim/.ICE* file will be owned by root and you can’t
have that…

why it sometimes gets messy, and sometimes not is one those great
mysteries of life…

ymmv
oh, if anyone just MUST try it, there are several dozen threads here
where you fine how to un-mess it…


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

What if there were no hypothetical questions?