# Folder Permissions in Ubuntu 8.04



## 22moondune (Aug 2, 2008)

I was trying to delete a file recently and received this message:

"Cannot move items to trash, do you want to delete them immediately?"

When I clicked "delete immediately", it came up with an error message that wouldn't allow me too. I have never seen this before and so I ended up messing around in the permissions for the folders. This worked as far as letting me delete items, but still it would come up with an error message. I looked into changing the permissions for all folders at once through the terminal and found some references that suggested using commands such as the following:

sudo chmod 755 $1

Unfortunately, that didn't work for me so I tried adding the -r in the command and no difference. Can anyone help with this problem? Thanks in advance.


----------



## hal8000 (Dec 23, 2006)

22moondune said:


> I was trying to delete a file recently and received this message:
> 
> "Cannot move items to trash, do you want to delete them immediately?"
> 
> ...



From the directory containing the file or folder you want to delete post
the output of:
ls -l

(That small "l" as in "long")
File permissions in unix are more complicated than windows. Although there are only read, write and execute attributes, each file has an owner, group and other attributes. Not to mention special attribuites that can be set such as suid and guid.
For your part it is unclear what you are trying to do until you post the output of ls -l


----------



## 22moondune (Aug 2, 2008)

Here is the output of the ls -l command you asked me to input. I was in my username directory when I used the command. Thanks for helping.

[email protected]:~$ ls -l
total 12
drwxr-xr-x 2 steven steven 4096 2008-08-05 16:23 Desktop
drwxr-xr-x 8 steven steven 4096 2008-08-05 00:38 Downloads
drwx------ 6 steven steven 4096 2008-06-29 13:18 Ubuntu Themes


I'm not exactly sure what this means, but if you can help me set all the permissions back so I can delete items without getting prompted, that's what I really want.


----------



## hal8000 (Dec 23, 2006)

22moondune said:


> Here is the output of the ls -l command you asked me to input. I was in my username directory when I used the command. Thanks for helping.
> 
> [email protected]:~$ ls -l
> total 12
> ...



The above are showing directories (folders) which you own and are in your group. You do not want to delete Desktop (unless you like reinstalling) or Dorwnloads or possibly not Ubuntu Themes.

What file were you deleting?
To delete a folder its rm -r (however this is a dangerous command for a newbie) as you are not always in the directory you think you are.

The file manager with Gnome Desktop is nautilus, and like windows explorer you can right click, delete, left click, highlight, press delete on keyboard etc.
You have typed ls -l from your home directory so your bash prompt will look like
[email protected]>
(well not exactly but similar and hostname changes to whatever you set your computer name to).
Post back if you need more help, or the name of the file you want to delete.


----------



## lensman3 (Oct 19, 2007)

Three things to check:

1. In a text window do a "cd". This should take you to your home directory. Then do a "pwd" and see if you really are in your home directory. Your error message is indicative of being root.

2. In a text window, type "alias" and see if "rm" has been aliased to some other command. If you were trying to delete the file from GUI, I can't see alias causing a problem. If alias does cause a problem, then that's a feature that should be turned off.

3. Take a look at "dmesg" from a text line. See if the kernel reports any problem.

4. Check the premissions on the home directory "." and ".." file. Sometimes, the wrong permissions on a parent can cause problems in subdirectories.

I know when you are root in a command window, "rm" is aliased so that the prompt mode is required. That way as root you can't do a "rm -fr /"!


----------

