I cant remove a file of my own [SOLVED]

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Prudon
Level 1
Level 1
Posts: 10
Joined: Fri Apr 28, 2017 11:57 am
Location: Bariloche, Argentina
Contact:

I cant remove a file of my own [SOLVED]

Post by Prudon »

I have a problem with booting the Dropbox because i cant modify a file. There is a file in /.config/autostart/dropbox.desktop that I can not delete or modify (icon appears with a padlock). I figure as the owner user, with rights W and R, but for any attempt to delete or modify the CLI tell me "Operation not allowed". The strange thing is that in a listing ls -l the file appears the same as the the rest of the directory files.

Code: Select all

    diego@diego-Aspire-5745 ~/.config/autostart $ ls -l
total 44
-rw-r--r-- 1 diego diego 2480 ago 30  2016 diodon.desktop
-rw-r--r-- 1 diego diego  235 mar 17 15:26 dropbox.desktop
-rw-r--r-- 1 diego diego  312 abr 26 15:14 insync.desktop
-rw-r--r-- 1 diego diego  301 abr 26 13:38 megasync.desktop
-rw-r--r-- 1 diego diego  258 ago 30  2016 mint-ctrl-alt-backspace.desktop
-rw-r--r-- 1 diego diego  250 abr 26 15:21 mintupdate.desktop
-rw-r--r-- 1 diego diego  272 may 11  2016 mintupload.desktop
-rw-r--r-- 1 diego diego  200 jul  6  2016 mintwelcome.desktop
-rw-r--r-- 1 diego diego  328 jul  6  2016 nvidia-prime.desktop
-rw-r--r-- 1 diego diego 1098 ago 30  2016 parcellite-startup.desktop
-rw-r--r-- 1 diego diego  265 dic 21 11:27 start-conky.desktop
diego@diego-Aspire-5745 ~/.config/autostart $
Image
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
JerryF
Level 16
Level 16
Posts: 6572
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: I cant remove a file of my own

Post by JerryF »

Prudon wrote:I have a problem with booting the Dropbox because i cant modify a file. There is a file in /.config/autostart/dropbox.desktop that I can not delete or modify (icon appears with a padlock). I figure as the owner user, with rights W and R, but for any attempt to delete or modify the CLI tell me "Operation not allowed". The strange thing is that in a listing ls -l the file appears the same as the the rest of the directory files.
This is strange. Try this: go to Startup Applications, remove the Dropbox entry, then add it back. See if the dropbox.desktop in autostart still has the padlock.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: I cant remove a file of my own

Post by Flemur »

Code: Select all

-rw-r--r-- 1 diego diego 2480 ago 30  2016 diodon.desktop
That means you (and your group) don't have write permission...which you need to delete the file.**

It's strange that you own them (you are diego?) but don't have permission to delete them.

From command-line you could try

Code: Select all

cd ~/.config/autostart
Then

Code: Select all

rm -f filename(s)
(-f = force) or

Code: Select all

chmod +w filename(s)
(give yourself write permission) then try the delete again. You might also be able to change permission in the filebrowser if you hate typing...

**
https://unix.stackexchange.com/question ... utput-mean
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: I cant remove a file of my own

Post by Cosmo. »

With write permission for a file you can alter the file, but you cannot delete it, if you do not have write permissions for the containing folder. The output in the starting post does not show the entries for the folder. Use instead the command ls -la, this will show us the needed information.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: I cant remove a file of my own

Post by Flemur »

Code: Select all

chmod -R +w ~/.config/autostart
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Prudon
Level 1
Level 1
Posts: 10
Joined: Fri Apr 28, 2017 11:57 am
Location: Bariloche, Argentina
Contact:

Re: I cant remove a file of my own

Post by Prudon »

JerryF wrote:
Prudon wrote:I have a problem with booting the Dropbox because i cant modify a file. There is a file in /.config/autostart/dropbox.desktop that I can not delete or modify (icon appears with a padlock). I figure as the owner user, with rights W and R, but for any attempt to delete or modify the CLI tell me "Operation not allowed". The strange thing is that in a listing ls -l the file appears the same as the the rest of the directory files.
This is strange. Try this: go to Startup Applications, remove the Dropbox entry, then add it back. See if the dropbox.desktop in autostart still has the padlock.
I can't remove the Dropbox entry. That's the origin of the problem...
Prudon
Level 1
Level 1
Posts: 10
Joined: Fri Apr 28, 2017 11:57 am
Location: Bariloche, Argentina
Contact:

Re: I cant remove a file of my own

Post by Prudon »

Yes, I am Diego. See the result: "Operacion no permitida" means "Operation not allowed". My Mint is in spanish, because i am from Argentina.

Code: Select all

diego@diego-Aspire-5745 ~/.config/autostart $ rm -f dropbox.desktop 
rm: no se puede borrar 'dropbox.desktop': Operación no permitida
diego@diego-Aspire-5745 ~/.config/autostart $ chmod +w dropbox.desktop 
chmod: cambiando los permisos de 'dropbox.desktop': Operación no permitida
diego@diego-Aspire-5745 ~/.config/autostart $ 
Flemur wrote:

Code: Select all

-rw-r--r-- 1 diego diego 2480 ago 30  2016 diodon.desktop
That means you (and your group) don't have write permission...which you need to delete the file.**

It's strange that you own them (you are diego?) but don't have permission to delete them.

From command-line you could try

Code: Select all

cd ~/.config/autostart
Then

Code: Select all

rm -f filename(s)
(-f = force) or

Code: Select all

chmod +w filename(s)
(give yourself write permission) then try the delete again. You might also be able to change permission in the filebrowser if you hate typing...

**
https://unix.stackexchange.com/question ... utput-mean
Prudon
Level 1
Level 1
Posts: 10
Joined: Fri Apr 28, 2017 11:57 am
Location: Bariloche, Argentina
Contact:

Re: I cant remove a file of my own

Post by Prudon »

I cant remove or modify other files in the same folder.
This is my terminal:

Code: Select all

diego@diego-Aspire-5745 ~/.config/autostart $ ls -la
total 52
drwxr-xr-x  2 diego diego 4096 abr 29 19:29 .
drwxr-xr-x 79 diego diego 4096 abr 27 23:12 ..
-rw-r--r--  1 diego diego  235 mar 17 15:26 dropbox.desktop
-rw-r--r--  1 diego diego  312 abr 26 15:14 insync.desktop
-rw-r--r--  1 diego diego  301 abr 26 13:38 megasync.desktop
-rw-r--r--  1 diego diego  258 ago 30  2016 mint-ctrl-alt-backspace.desktop
-rw-r--r--  1 diego diego  250 abr 26 15:21 mintupdate.desktop
-rw-r--r--  1 diego diego  272 may 11  2016 mintupload.desktop
-rw-r--r--  1 diego diego  200 jul  6  2016 mintwelcome.desktop
-rw-r--r--  1 diego diego  328 jul  6  2016 nvidia-prime.desktop
-rw-r--r--  1 diego diego 1098 ago 30  2016 parcellite-startup.desktop
-rw-r--r--  1 diego diego  408 abr 29 19:29 print-applet.desktop
-rw-r--r--  1 diego diego  265 dic 21 11:27 start-conky.desktop
diego@diego-Aspire-5745 ~/.config/autostart $ 
Cosmo. wrote:With write permission for a file you can alter the file, but you cannot delete it, if you do not have write permissions for the containing folder. The output in the starting post does not show the entries for the folder. Use instead the command ls -la, this will show us the needed information.
Prudon
Level 1
Level 1
Posts: 10
Joined: Fri Apr 28, 2017 11:57 am
Location: Bariloche, Argentina
Contact:

Re: I cant remove a file of my own

Post by Prudon »

Look what happens in my terminal...

Code: Select all

diego@diego-Aspire-5745 ~/.config $ chmod -R +w ~/.config/autostart
chmod: cambiando los permisos de '/home/diego/.config/autostart/dropbox.desktop': Operación no permitida
diego@diego-Aspire-5745 ~/.config $ 
Flemur wrote:

Code: Select all

chmod -R +w ~/.config/autostart
I think is not possible to change permision's folder because the file is blocked.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: I cant remove a file of my own

Post by Flemur »

Prudon wrote:

Code: Select all

chmod -R +w ~/.config/autostart
[
I think is not possible to change permision's folder because the file is blocked.
They don't get locked/blocked like in windows. You can delete files while some other program is using them, if you have permission.

Try

Code: Select all

sudo chmod -R +w ~/.config/autostart
or

Code: Select all

sudo chmod -R a+w ~/.config/autostart
"a+w" = all + write = other users can delete it. If you have any.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
kukamuumuka

Re: I cant remove a file of my own

Post by kukamuumuka »

Code: Select all

cd ~/.config/autostart
ls -la
sudo chattr -i dropbox.desktop
rm dropbox.desktop
PS. if you cannot delete the file, it is corrupted.
Prudon
Level 1
Level 1
Posts: 10
Joined: Fri Apr 28, 2017 11:57 am
Location: Bariloche, Argentina
Contact:

Re: I cant remove a file of my own

Post by Prudon »

Is the same again...
diego@diego-Aspire-5745 ~ $ sudo chmod -R +w ~/.config/autostart
[sudo] password for diego:
chmod: cambiando los permisos de '/home/diego/.config/autostart/dropbox.desktop': Operación no permitida
diego@diego-Aspire-5745 ~ $ sudo chmod -R a+w ~/.config/autostart
chmod: cambiando los permisos de '/home/diego/.config/autostart/dropbox.desktop': Operación no permitida
diego@diego-Aspire-5745 ~ $
Flemur wrote:
Prudon wrote:

Code: Select all

chmod -R +w ~/.config/autostart
[
I think is not possible to change permision's folder because the file is blocked.
They don't get locked/blocked like in windows. You can delete files while some other program is using them, if you have permission.

Try

Code: Select all

sudo chmod -R +w ~/.config/autostart
or

Code: Select all

sudo chmod -R a+w ~/.config/autostart
"a+w" = all + write = other users can delete it. If you have any.
Prudon
Level 1
Level 1
Posts: 10
Joined: Fri Apr 28, 2017 11:57 am
Location: Bariloche, Argentina
Contact:

Re: I cant remove a file of my own

Post by Prudon »

You're right. After hours I've got it, and I've learned it too. I did not know in chattr command, and I thought permissions were everything.
Thanks to you, and for JerryF, Flemur and Cosmo too.
:D
administrollaattori wrote:

Code: Select all

cd ~/.config/autostart
ls -la
sudo chattr -i dropbox.desktop
rm dropbox.desktop
PS. if you cannot delete the file, it is corrupted.
User avatar
JerryF
Level 16
Level 16
Posts: 6572
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: I cant remove a file of my own

Post by JerryF »

Prudon wrote:You're right. After hours I've got it, and I've learned it too. I did not know in chattr command, and I thought permissions were everything.
Thanks to you, and for JerryF, Flemur and Cosmo too.
:D
administrollaattori wrote:

Code: Select all

cd ~/.config/autostart
ls -la
sudo chattr -i dropbox.desktop
rm dropbox.desktop
PS. if you cannot delete the file, it is corrupted.
Glad you got if fixed. Kudos to administrollaattori
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: I cant remove a file of my own

Post by Flemur »

Prudon wrote:You're right. After hours I've got it, and I've learned it too. I did not know in chattr command, and I thought permissions were everything.
Me too! I wonder why that(those) file(s) got into that state? I've never had that happen...
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Locked

Return to “Software & Applications”