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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-27-2010, 06:31 AM
|
#1
|
LQ Newbie
Registered: Jul 2008
Location: mumbai
Posts: 4
Rep:
|
giving ownership while creating directories
Is there any way by which one can give ownership while creating directories itself. It should be one command otherwise it requires root login to change ownership of a directory.
|
|
|
01-27-2010, 06:39 AM
|
#2
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
I believe that only root can change ownership of files or directories. (This seems logical to me.)
Take a look at "man mkdir" for what options are available when creating a directory.
|
|
1 members found this post helpful.
|
01-27-2010, 06:42 AM
|
#3
|
LQ Newbie
Registered: Jan 2009
Posts: 27
Rep:
|
You have to be root to change ownership of any file...I think. I might be wrong. If not, then any user can change the ownership of his files to someone else.
Samsom
Pixellany beat me to it....damn my slow internet connection!
|
|
|
01-27-2010, 06:51 AM
|
#4
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Quote:
Originally Posted by samsom
If not, then any user can change the ownership of his files to someone else.
Samsom
|
Or---worse yet, from someone else to his---or to yet another person. Not good..... 
|
|
|
01-27-2010, 09:01 AM
|
#5
|
Member
Registered: Oct 2008
Location: Pakistan, Islamabad
Distribution: CentOS, Fedora, Solaris
Posts: 154
Rep:
|
first you have to make directory then change user permission, there may be other solution also.
instead of root admin user can also do this with the help of sudo command in centOS.
|
|
|
All times are GMT -5. The time now is 01:48 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|