LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-16-2003, 11:11 AM   #1
version
LQ Newbie
 
Registered: Jun 2003
Posts: 10

Rep: Reputation: 0
newbie permissions


Can someone tell me how to basically make my regular user account have root permissions all the time, not the su - command, I want to be able to have root permissions everywhere I go. I ma trying to create a directory in the /var/www/html/ but I get accessed denied everytime. I am in the root group, the root group has rwx permissions to that folder so I am stumped.

Also could someone run down how to change right on a directory from the command line here so I could say assign a user certain rights to a certain directory from the command line?

Thanks
 
Old 06-16-2003, 11:31 AM   #2
MArgRes
Member
 
Registered: Jun 2003
Distribution: Fedora Core 2
Posts: 37

Rep: Reputation: 15
You don't want to do that. The rule of thumb is to only use the root account when you have to. You definitely don't want to go around as root all of the time as you could inadvertently do something and hose your system. If you want a regular user to be able to create/modify files in your web server directories, you could change the group of those directories to that user and then set the write bit on the directories. That'd do it. Something like this (as root):

chgrp <newgroup> /var/www/html
chmod g+w /var/www/html

Read the man pages for chmod, chgrp, and chown. There is also a pretty good explanation of some tricky settings here:

http://www.hackinglinuxexposed.com/a.../20030417.html

There is a 'part two' to that too, just go to the next article...
 
Old 06-16-2003, 11:32 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it possible, but a very very very bad idea. one of the first things a newbie tends to want to do is to break fundamental conventions that have successfully worked for over 20 years.... don't mess with it (yet)

if it's just that directory, then chmod it to allow everyone to write to it, or chown it to make it owned by you.

chmod a+rw /directory

chown user:user /directory
 
Old 06-16-2003, 12:12 PM   #4
version
LQ Newbie
 
Registered: Jun 2003
Posts: 10

Original Poster
Rep: Reputation: 0
ok, I understand, but is there a way to make that cascade to the directories below it? so I could do the /var directory and have it cascade to the ftp and www directories?
 
Old 06-16-2003, 12:14 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
don't do /var, it's got "heavy shit" in it, but to do both those directories and the ones beneath those, "chmod -R"... "man chown" far more information
 
Old 06-16-2003, 12:57 PM   #6
version
LQ Newbie
 
Registered: Jun 2003
Posts: 10

Original Poster
Rep: Reputation: 0
ok I logged in as root via the su - command
then I did a chown user:version /var/www/html

I got a user:Invalid user error

any clues there?

I tried all the combos read the man pages still can't get it.
 
Old 06-16-2003, 01:36 PM   #7
version
LQ Newbie
 
Registered: Jun 2003
Posts: 10

Original Poster
Rep: Reputation: 0
nevermind my install just blew up on not being able to find a font called 'fixed' if u have any opinions there for future use that would be great, here we go with another install ...wheeeee
 
Old 06-16-2003, 01:37 PM   #8
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
"chown user:version /var/www/html"

should be "user.group", so your command should be "chown -R user.user /var/www/html" Which will make the files belong to your user and your user's group.

Read this for more info:
http://badcomputer.no-ip.com/linux/permissions.bot
 
  


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
Newbie Permissions Problems. Help me guys the_last_rites Linux - Newbie 5 01-18-2005 11:54 AM
Newbie: ext3 permissions statmobile Linux - Newbie 7 02-09-2004 12:01 PM
Newbie with user permissions trouble. KiLLaWaBBiT Linux - General 7 08-14-2003 09:56 PM
::Setting user permissions:: ::Newbie question:: XxAndyxX Linux - Software 3 03-20-2003 01:55 AM
Hopefully a stupid Newbie Question - Sound/Permissions airsylph Linux - Newbie 2 01-26-2002 02:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:09 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
Open Source Consulting | Domain Registration