Results 1 to 4 of 4
I downloaded a file using firefox on my linux box (firefox ran as root). So lets say the filename is:
myfile.zip and it belonged to user root and group root
...
- 04-29-2010 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 9
[SOLVED] why do I get permission denied?
I downloaded a file using firefox on my linux box (firefox ran as root). So lets say the filename is:
myfile.zip and it belonged to user root and group root
I wanted to move this to the directory belonging to user mark
So as as a root user, I did chown mark <filename> followed by chgrp mark <filename>
so now when I do ls -l on file, user is mark and group is mark
now I when try to move this file from /root/Desktop (location where firefox downloaded it) to /home/mark/dir1 - I get the cannot move --- permission denied error.
I even did chmod 775 on filename to see if it was a permission issue..but still no luck.
What am I missing here?
Thanks in advance.
- 04-29-2010 #2
What user are you trying to move it as? If you're trying to move it as mark, the problem is that you don't have execute permissions /root, which means you cannot access any of the files in that directory (including /root/Desktop).
Also, I'll add the obligatory disclaimer that running any unnecessary software as root is a huge security risk, particularly software as large and open as Firefox. You should only use root to run software that needs to be run as root.DISTRO=Arch
Registered Linux User #388732
- 04-29-2010 #3
When you move a file, the name and inode number have to be removed from the old directory and written into the new one. That's what moving really does; the file doesn't move, only its indexing info does. But in this case the old directory belongs to root, so you can't edit it. You have transferred ownership of the file to yourself but you can't transfer ownership of its parent directory. You can move it as root though.
btw, you can change both owner and group in one operation using chmod:
chmod mark.mark filename"I'm just a little old lady; don't try to dazzle me with jargon!"
- 05-04-2010 #4Just Joined!
- Join Date
- Mar 2009
- Posts
- 9
Thanks a lot!


