Comments (7)
The .Trash-$uid and the .Trash directories should be created in the volume, usually this means /media/disk/.Trash or /media/disk/.Trash-123. Moreover the /media/disk/.Trash directory needs the sticky bit set.
from trash-cli.
@andreafrancia do you know off hand the commands necessary to set the sticky bit?
What if I wish to have write permission only to part of a disks file heirarchy - is it possible to have .Trash folders in other locations? There'd be all sorts of issues about where to look for it etc... (eg: if things are trashed by different users etc..), but it should be possible to work out a sensible strategy I think.
I currently have 'rm' aliased to 'trash-put' - in the situation above, I'm stuck it seems, and have to use /bin/rm ... to delete things.
from trash-cli.
As drevicko said:
@andreafrancia do you know off hand
the commands necessary to set the sticky bit?
chmod +t FILE
What if I wish to have write permission only to part of a disks file
heirarchy
man chmod
man chown
Google about "unix group and user permissions".
- is it possible to have .Trash folders in other locations?
TrashSpecs mandates that the location should be $topdir/.Trash
There'd be all sorts of issues about where to look for it etc... (eg: if
things are trashed by different users etc..), but it should be possible to
work out a sensible strategy I think.
Check out the FreeDesktop.org TrashSpec.
I currently have 'rm' aliased to 'trash-put' - in the situation above,
Don't do this. It's a bad idea. If I suggested somewhere to do this I was
wrong.
I'm stuck it seems, and have to use /bin/rm ... to delete things.
You can bypass aliases adding a leading backslash:
\rm FILE
from trash-cli.
Excellent response! Thankyou @andreafrancia for taking the time and providing all that useful info (:
Having a quick look at the TrashSpec, I'd say that making $topdir/.Trash globally writable probably isn't such an issue - stuff retains its permissions when put there.
You're probably right about aliasing rm
- better to use trash-put
or a simplifying alias like trash
. I have an engrained habit of using rm
though, and have been bitten by it a few times, so for now I'll keep it aliased to trash-put
and try to change my habit ;)
from trash-cli.
You may want create an alias like this:
alias rm='echo "This is not the command you are looking for."; false'
from trash-cli.
I like your style ;)
from trash-cli.
Hey @andreafrancia , I am facing the similar issue.
When I use trash-put
in my home directory, it works perfectly as you can see
However, we have another disk \data
and trash-put
command does not work there.
I have created a .Trash-$UID
dir and provided the permissions as mentioned in the documentation
chmod a+rw .Trash-$UID` chmod +t .Trash-$UID
I am not sure what to do. Could you please help me out?
Thanks,
Naman
from trash-cli.
Related Issues (20)
- Continuous Testing on Python 2.7
- Cannot restore a file from a mounted cifs volume HOT 10
- verbose output HOT 1
- trash-empty: option to only empty files trashed prior to application start HOT 1
- Confirm Dialog on `trash-empty` HOT 5
- trash-put: cannot trash regular file @raffaem
- Slow trash-empty taking hours to delete HOT 1
- If a trash fails before everything is deleted, all the files that *were* deleted *cannot be restored* HOT 9
- Provide an option to send deleted items to macOS Desktop Trash. HOT 6
- Hitting return on trash-restore without entering a number results in unclear behavior HOT 1
- Crash while removing file/dir wth utf-8 chars HOT 2
- [Question] How to correctly answer "Proceed? (y/n)" when using trash-empty in script? HOT 4
- Crash with `--volumes`: AttributeError: 'PrintVolumesList' object has no attribute 'run_action' HOT 1
- ZSH completion very slow HOT 3
- Add option to preserve folders containing recently modified files
- ZSH completion does not allow to specify multiple files to trash HOT 1
- Don't force user to install old mock library HOT 10
- I have a number of bind mounts, and `trash-list` shows trashed items without any duplication. HOT 4
- having `--dry-run` for `trash-put` HOT 4
- PermissionError in trash-empty incorrectly user's .Trash folder HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trash-cli.