LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-24-2015, 06:55 AM   #1
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

Rep: Reputation: 174Reputation: 174
Enabling the Trash Bin on a new file system.


I've created a directory called video in '/' and an associated disk partition.
At boot time /dev/sda5 is mounted as /video.

Every thing works swimmingly in /video as a file system, except if I delete a file I must delete it "permanently" - I can't have it put in my Waste bin.

My system is basically Debian, with nemo as my file manager, on a Mint-like desktop.
 
Old 11-24-2015, 01:47 PM   #2
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

Rep: Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837
you shouldn't really choose /video as a mount point, rather sth like /home/jeremy/video.
in any case, are you the owner of the folder in question, and how are you mounting it? through fstab? show us your fstab.
 
Old 11-24-2015, 06:55 PM   #3
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

Original Poster
Rep: Reputation: 174Reputation: 174
Yes - it is mounted via fstab & I know I shouldn't put directories (mount points) in / because they will get wiped out if I ever do a re-install.
Here is my fstab (with a few other extras in it).
BTW I am the owner of the PC, so I can do as I like.
Code:
proc	/proc	proc	defaults	0	0
# /dev/sda1
UUID=91B7-FE06	/boot/efi	vfat	defaults	0	0
# /dev/sda2
UUID=7197cd12-815e-4190-b552-c3d6c0c2f24c	/	ext4	rw,errors=remount-ro	0	1
# /dev/sda3
UUID=b554d17c-7d66-477b-b8a2-1e0233ef1329	swap	swap	sw	0	0
# /dev/sda4
UUID=2549555d-63e6-48fc-b2d1-3072ef81c4d6	/home	ext4	rw,errors=remount-ro	0	2
# /dev/sda5
UUID=fd2d39a7-5feb-48c5-ad61-a1a361e18bd8	/video	ext4	rw,errors=remount-ro	0	2 
# /dev/sdb2
UUID=11169433-051f-4b3b-bd05-7c31c85f0d47	/backup	ext4    rw,errors=remount-ro    0       2
# /dev/sdb3
UUID=7081860c-6dd6-41d2-9fdb-0734b73b8c47	/filestore ext4 rw,errors=remount-ro    0       2

NAS:/mnt/C/	/media/NAS   nfs rw,hard,intr,users,noauto,noatime,namlen=255,rsize=16384,wsize=16384	0	2

/dev/scd0    			/media/cdrom0   	udf,iso9660 user,noauto,exec,utf8	 	0       0

# TEMPORARY MOUNT-NO LONGER USED
#UUID=d53f2ee8-3263-4c20-acd7-2b4ec247af93	/temp-prot	ext4	rw,errors=remount-ro    0       2
Alternatively an edited df -h display is as follows:-
Code:
Filesystem      Size  Used Avail Use Mounted on
/dev/sda2        20G  7.9G   11G  44% /
/dev/sda1      1022M  132K 1022M   1% /boot/efi
/dev/sda4       148G   26G  115G  18% /home
/dev/sda5       577G  247G  301G  46% /video
/dev/sdb2        88G   53G   32G  63% /backup
/dev/sdb3       296G   86G  195G  31% /filestore

Last edited by JeremyBoden; 11-24-2015 at 06:56 PM.
 
Old 11-24-2015, 11:21 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,825

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
Quote:
I know I shouldn't put directories (mount points) in / because they will get wiped out if I ever do a re-install.
no it is a ownership and folder/file permission ISSUE for who has read/write privileges to it
-- root owns the folders on "/"

it is such a bad idea that if this was a redhat system SELinux would PREVENT the system from booting until it is fixed

why do you think the old location was /mnt/???
the new /run/media/"yourusername"/name

Last edited by John VV; 11-24-2015 at 11:22 PM.
 
Old 11-25-2015, 12:53 AM   #5
serverpoint.com
Member
 
Registered: Oct 2015
Posts: 52

Rep: Reputation: 6
I think below link will be helpful.

https://www.maketecheasier.com/perma...e-files-linux/
 
Old 11-25-2015, 07:26 AM   #6
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

Original Poster
Rep: Reputation: 174Reputation: 174
In this instance, I want to do the opposite to a secure delete.

If I delete a file via the GUI file manager, by default I'd like it to go in the "wastebin".
I know that's a bit like M$ do it, but it is sometimes convenient.

I don't understand the permissions thing.
Code:
drwxr-xr-x   9 root   root   4.0K Nov  1 14:30 /home
drwxr-xr-x   2 root   root   4.0K Apr  6  2015 /mnt
dr-xr-xr-x   5 jeremy public 4.0K Jun 29 09:03 /video
So I seem to have less or is it fewer(?) permissions on /video than on /mnt or /home.

Note that the wastebin is a desktop thing that points to ~/.local/share/Trash, which is where the deleted objects go.

@John VV
Quote:
why do you think the old location was /mnt/???
the new /run/media/"yourusername"/name
I have always had and still have a /mnt/ directory.
I have never had a /run/media/ directory.
 
Old 11-25-2015, 02:25 PM   #7
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

Rep: Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837Reputation: 837
basically it's an application that is managing your trash can.
and that app doesn't like dealing with folders so high up in the directory structure.
try it again, with the mount somewhere inside your $HOME, maybe it will work.

apart from that - i can't explain exactly why, but surely this: "a redhat system SELinux would PREVENT the system from booting until it is fixed" should tell you not to do it?
 
1 members found this post helpful.
Old 11-25-2015, 03:15 PM   #8
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

Original Poster
Rep: Reputation: 174Reputation: 174
In my experience, red hat systems (at least a few years back) the non-commercial systems weren’t all that reliable.
Also Debian based systems (even Ubuntu until it went all Unity) are very stable and much easier and to understand and use.

It also seems a strange set-up where I would have to pay money for a distro.
Quote:
The United States National Security Agency (NSA), the original primary developer of SELinux...
That's not exactly a glowing recommendation to run SeLinux is it?

I'll experiment with moving /video to /mnt/video to see if the user application likes it better.
 
Old 11-25-2015, 04:29 PM   #9
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

Original Poster
Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by ondoho View Post
basically it's an application that is managing your trash can.
and that app doesn't like dealing with folders so high up in the directory structure.
try it again, with the mount somewhere inside your $HOME, maybe it will work.

apart from that - i can't explain exactly why, but surely this: "a redhat system SELinux would PREVENT the system from booting until it is fixed" should tell you not to do it?
I created a new partition, mounted it as /mnt/test and added a few files to it.
I paid no attention to any authorisations or what SeLinux might say (if it were installed).
I got a lost+found directory created (previously missing) and then I deleted the files - which appeared in my Trash.
So it seems, as you say, that Trash won't work at the top level.

I'll just create a few mount points in /mnt and make minor alterations to /etc/fstab and it will be fixed.
Thanks.
 
Old 11-25-2015, 08:45 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Quote:
red hat systems (at least a few years back) the non-commercial systems werent all that reliable.
I'm guessing you mean the R&D distro of Fedora - that's not supposed to be stable.
What you want is either RHEL itself (but you pay for support/updates) or Centos, a free rebuild of RHEL; includes updates but not support.
 
Old 11-25-2015, 09:03 PM   #11
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

Original Poster
Rep: Reputation: 174Reputation: 174
But I'm just running several desktop PC's - so I don't need RHEL.
If I was running a data-centre it might be up for consideration.

My Linux history runs like this:-
Mandrake/Mandriva - OK considering its age, but a bit broken.
Red Hat distro - probably didn't understand it - but rpm system often broken.
Ubuntu - very good until they messed with the Desktop, Unity was the last straw.
Mint - mostly excellent - but upgrade requirements very tedious.
LMDE - Linux Mint Debian Edition - based on Debian rather than Ubuntu
very neat and simple; the perfect distro, does everything I want it to do.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] When I click the "Trash" icon ,I encounter an error.My trash bin is broken! mirage1993 Linux - Newbie 8 12-16-2014 12:34 PM
chmod: changing permissions of `/usr../bin': Read-only file File System Issue cdhar Linux - Newbie 3 12-31-2012 07:17 AM
enabling file system journal Manjunath1847 Linux - General 5 09-03-2009 09:06 AM
Read-only file system after enabling/disabling root benn333 Ubuntu 2 02-25-2007 01:42 PM
File in Trash crashes my system Jerrodg Linux - Software 5 08-30-2005 03:13 PM


All times are GMT -5. The time now is 02:20 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration