andreafrancia / trash-cli

Command line interface to the freedesktop.org trashcan.
GNU General Public License v2.0
3.53k stars 177 forks source link

Sorry! Still "trash-put: cannot trash regular file" #312

Open Taskii-Lei opened 10 months ago

Taskii-Lei commented 10 months ago

Describe the bug Sorry! I have done these below:

mkdir /lustre/S/huanglei/.Trash-6155
chmod a+w /lustre/S/huanglei/.Trash-6155
chmod +t /lustre/S/huanglei/.Trash-6155

But when I wanna trash the /lustre/S/huanglei/test.py , it still raises the error:

trash-put: cannot trash regular file '/lustre/S/huanglei/test.py'

I'm so confused... Thank you!!

trash-cli version 0.23.2.13.2

Are you using the latest version of trash-cli? Yes

Have you tried if the bug is present in the latest version of trash-cli? Yes

Please, install the latest version of trash-cli and try again before submitting the bug

First of all you need to uninstall any previous version of trash-cli::

$ [sudo] pip uninstall trash-cli # remove the previous version (with pip)
$ [sudo] apt-get remove trash-cli # remove the previous version (with apt)
$ [sudo] yum uninstall trash-cli # remove the previous version (with yum)
$ ... # refer to the package manager of your distribution

Then install the latest version from git::

$ pip install pip install git+https://github.com/andreafrancia/trash-cli

Have done that? Then continue with the bug report.

Operating system:

To Reproduce Copy and paste the commands (and their output) to execute in order to reproduce the behavior: $ mkdir /lustre/S/huanglei/.Trash-6155 $ chmod a+w /lustre/S/huanglei/.Trash-6155 $ chmod +t /lustre/S/huanglei/.Trash-6155 $ trash-put /lustre/S/huanglei/test.py

ls: trash-put: cannot trash regular file '/lustre/S/huanglei/test.py' $ trash-list 2023-09-01 11:57:35 /home/S/huanglei/draft.txt 2023-09-05 11:07:26 /home/S/huanglei/index.html

Expected behavior A clear and concise description of what you expected to happen.

Volumes detail I have done the echo $UID. It's 6155.

andreafrancia commented 8 months ago

Thank you, I'm working on trash-put output to make it more clear because it fails.

andreafrancia commented 8 months ago

Hi @Taskii-Lei, I've prepared a new release (0.23.11.10) of trash-cli where I added more clearer error messages for trash-put.

Can you try it?

$ pip uninstall trash-cli
$ pip install trash-cli
$ trash-put --version

Thank you