LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-16-2010, 12:36 PM   #1
Drigo
Member
 
Registered: Jun 2009
Posts: 111

Rep: Reputation: 17
Angry chmod and highlighted directories.


So I gave the following permission using sudo su to some directories:

sudo a+x -R ~/<SOME FOLDER>/*
sudo a+w -R ~/<SOME FOLDER>/*


After doing this, I can access wirte and read all directories but my terminal shows these folders highlighted and I really dont like this. Is there any way they can look like before (with no highlights)?

Thanks in advance!
 
Old 03-16-2010, 12:49 PM   #2
mario.almeida
Member
 
Registered: May 2008
Location: India
Distribution: Ubuntu 10.04, CentOS
Posts: 179

Rep: Reputation: 27
Change directory to its default permission (755)

find ~/ -type d -exec chmod 755 {} \;
 
Old 03-16-2010, 12:59 PM   #3
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
Quote:
Originally Posted by Drigo View Post
So I gave the following permission using sudo su to some directories:

sudo a+x -R ~/<SOME FOLDER>/*
sudo a+w -R ~/<SOME FOLDER>/*


After doing this, I can access wirte and read all directories but my terminal shows these folders highlighted and I really dont like this. Is there any way they can look like before (with no highlights)?

Thanks in advance!
Code:
ls -color=never
 
Old 03-16-2010, 01:01 PM   #4
Drigo
Member
 
Registered: Jun 2009
Posts: 111

Original Poster
Rep: Reputation: 17
But I still want to access and modify this files....any other solution?
 
Old 03-16-2010, 01:03 PM   #5
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Its in your home directory. You can access it, modify it, make love to it without messing about with permissions.
 
Old 03-16-2010, 01:14 PM   #6
Drigo
Member
 
Registered: Jun 2009
Posts: 111

Original Poster
Rep: Reputation: 17
lol....probably not making love with it. It was in root but now I copied it to a username home directory thats why I had to use chmod
 
Old 03-16-2010, 01:55 PM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by Drigo View Post
lol....probably not making love with it. It was in root but now I copied it to a username home directory thats why I had to use chmod
Maybe better to leave permissions untouched and simply change the owner. See man chown for details.
 
Old 03-16-2010, 02:00 PM   #8
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Yeah, you don't want to be sharing files across home directories like this. Create a new directory for shared files and allow r/w/x permissions to all if thats how you want it, but ideally keep other users out of other home directories.

As colucix said, you want chown
 
  


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
chmod 775 to only the directories and chmod 664 to only the files? apachenew Linux - Security 6 09-27-2007 04:26 PM
chmod directories??? rev_swid Debian 17 04-13-2006 01:18 AM
CHMOD directories.sub-directories.files zerojosh Linux - Software 2 11-19-2005 04:22 PM
Using chmod on directories rob19 Linux - Newbie 4 07-10-2004 05:37 AM
chmod directories only vrillusions Linux - General 4 05-21-2003 09:02 PM


All times are GMT -5. The time now is 06:41 AM.

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