LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-04-2009, 05:47 AM   #1
knobby67
Member
 
Registered: Mar 2006
Posts: 622

Rep: Reputation: 43
Changing permissions of a folder


Hi all,

I've compiled my own code as root (long story why) anyway I now need to switch this to a normal user to compile. So I did a simple copy/paste (using gnome/debian lenny) to my home/user. I then logged in as used to see the folders with a padlock and permissions for root only. So I logged back in as root, change permissions to the used, check they were all ok, logged back in as user, and it still says owner root, even thought when I log in as root it shows user as owner Can anyone advise. Thanks.
 
Old 10-04-2009, 05:50 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
try
Code:
chown user:user file
or
Code:
chown -R user:user directory
 
Old 10-04-2009, 06:08 AM   #3
knobby67
Member
 
Registered: Mar 2006
Posts: 622

Original Poster
Rep: Reputation: 43
Hi I've discovered I have to close my system down to change permission.

However I've found it it changes folders, but not files :s

Is there a way I can change all the files at the same time, when I enter permissions I've clicked sub folders, it's code so there's an awful lot of files folders.

Also on the drop down permissions it has many options, what do I select for all users . Thanks
 
Old 10-04-2009, 06:11 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
You can use
Code:
chmod -R user:user folder
-R => recursive

See man chmod

You don't need to login logout as root, just login as user, open a terminal and type
Code:
su
password
chmod -R user:user folder
 
Old 10-04-2009, 06:16 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
Hi I've discovered I have to close my system down to change permission.
I don't think you need to do that :-)

Code:
cannabis:/home/repo# mkdir test
cannabis:/home/repo# touch  test/testfile
cannabis:/home/repo# ls -l test
total 0
-rw-r--r-- 1 root root 0 2009-10-04 13:21 testfile
cannabis:/home/repo# chown -R repo:repo test
cannabis:/home/repo# ls -l test
total 0
-rw-r--r-- 1 repo repo 0 2009-10-04 13:21 testfile
cannabis:/home/repo#

Last edited by repo; 10-04-2009 at 06:24 AM.
 
Old 10-04-2009, 08:13 AM   #6
knobby67
Member
 
Registered: Mar 2006
Posts: 622

Original Poster
Rep: Reputation: 43
Thanks after some totally locking myself out of folders I got it to work
 
  


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
Changing permissions of folder and subdirectories esc_5p1d0r Linux - Newbie 4 01-13-2007 02:39 PM
Changing Permissions in Win98 Folder brianZA Red Hat 3 01-03-2007 02:33 AM
Changing Permissions on Root Folder acascianelli Linux - General 1 08-04-2006 03:28 PM
Having problems changing permissions on a folder zener Linux - Security 16 12-19-2005 09:32 AM
Changing permissions of mounted folder of XP box owain Linux - Networking 1 06-12-2004 04:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:56 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