LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-07-2012, 05:04 PM   #1
Jace
LQ Newbie
 
Registered: Nov 2011
Location: In the U.S.A.
Posts: 9
Blog Entries: 1

Rep: Reputation: Disabled
Need help with file permission as root user


I am doing a server for my Linux class, and created a file in my home folder. I was told to move it into my /var/www/html/ folder but every time i do it says permission denied. I did the chmod on my original folder still no go, I don't know what else to do if anyone can help me please.
 
Old 03-07-2012, 05:06 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
So ... what user are you logged in as? What is the exact error message you're getting?
 
Old 03-07-2012, 05:20 PM   #3
Jace
LQ Newbie
 
Registered: Nov 2011
Location: In the U.S.A.
Posts: 9
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
I am logged in as a user, and the I keep getting "Error Moving File; Permission Denied" It's a file that I have to create for a web home page in sea monkey program
 
Old 03-07-2012, 05:21 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,365

Rep: Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004
Are you trying to move it as your user or as root? Your subject makes it sound like root is getting the permission denied message, but your last post makes it sound like you're just trying to move it as your user.
 
Old 03-07-2012, 05:32 PM   #5
Jace
LQ Newbie
 
Registered: Nov 2011
Location: In the U.S.A.
Posts: 9
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
yes I am trying to move it as a user, but I am not in terminal just in the menu interface. I did chmod on the file and still no go, and wondering if theres any other way?
 
Old 03-07-2012, 05:49 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,365

Rep: Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004
The problem isn't the permissions on the file you're moving, the problem is the permissions on the directory you're trying to move it into. Your user doesn't have write access to that directory, which is why you can't move anything there. Two options:

1 - Add write permissions to /var/www/html/ for your user
2 - Move the file to /var/www/html/ as root

You need to become root either way

Last edited by suicidaleggroll; 03-07-2012 at 05:50 PM.
 
Old 03-07-2012, 05:55 PM   #7
Jace
LQ Newbie
 
Registered: Nov 2011
Location: In the U.S.A.
Posts: 9
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
can you tell me on step 2 how that might be done, I am still new to this and this part is driving me crazy!?
 
Old 03-07-2012, 05:58 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,365

Rep: Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004
What distro are you using?
 
Old 03-07-2012, 06:03 PM   #9
Jace
LQ Newbie
 
Registered: Nov 2011
Location: In the U.S.A.
Posts: 9
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Fedora 14 im using it in VMWARE
 
Old 03-07-2012, 06:05 PM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,365

Rep: Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004Reputation: 2004
When you installed Fedora, you set up a root password. You should just need to open a terminal (should be in one of the menus, I assume you're using Gnome?), type "su -", enter the root password you set up when you installed the OS, and then move the file like normal:
Code:
mv /path/to/file /var/www/html/
 
Old 03-07-2012, 06:15 PM   #11
Jace
LQ Newbie
 
Registered: Nov 2011
Location: In the U.S.A.
Posts: 9
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
I tried that, the problem is logged in as root there is no index.html it is only under user, because it wasn't created in vi it was created in seamonkey browser, it is a web server i am creating
 
Old 03-07-2012, 06:20 PM   #12
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,131
Blog Entries: 2

Rep: Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833
The file will always be in the same place, regardless as which user you are logged in. If you saved in in your user's home directory (for example /home/jace/index.html) you will also find it there when you are logged in as root.
 
Old 03-07-2012, 06:25 PM   #13
Jace
LQ Newbie
 
Registered: Nov 2011
Location: In the U.S.A.
Posts: 9
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
WOOOOOHOOOO!!! ok thanks I found it and moved it, thanks for the help. I always confuse myself and it's good to have someone else just give me the pointers to get in the right directioin! thanks AGAIN my linux GURUS
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Giving a user root permission via the root group louisb Linux - Security 6 07-23-2007 01:56 AM
Give the root Permission to other user for manage File/Directory shipon_97 Linux - Newbie 2 01-28-2007 12:46 PM
permission denied as root user tuluks SUSE / openSUSE 6 12-18-2006 02:53 AM
Root Permission to user ??? winxandlinx Linux - General 5 10-31-2006 08:26 AM
whatever a non-root user does, he gets 'permission denied'. boazg Linux - Software 2 08-05-2005 09:17 AM


All times are GMT -5. The time now is 12:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration