Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-03-2007, 06:04 AM   #1
LQ Newbie
Registered: Mar 2006
Posts: 21

Rep: Reputation: 15
Directory privileges


I remove all privileges from not empty directory which belongs to me. Now I am not able to do anything with it. I know it was there any way to mange this issue without root action...?
Old 04-03-2007, 07:08 AM   #2
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Without root action? No, you'll have to either use su - or at least sudo and then cd to the directory in question and do:

chmod -r 644 * (without execute permissions), or chmod -r 755 (with), or use any other combination of permissions that suits you better.

Last edited by jay73; 04-03-2007 at 07:10 AM.
Old 04-03-2007, 01:10 PM   #3
LQ Newbie
Registered: Mar 2006
Posts: 21

Original Poster
Rep: Reputation: 15
So I have to talk with Admin, because sudo doesn't work with my username?
Old 04-03-2007, 01:21 PM   #4
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Did you change the permissions of the directory itself?

What does "ls -ld <directory-name>" show. Even if you had used "chmod 000 directory", you will be able to use
"chmod 766 <directory-name>" to undo what you did. If you are the owner of the directory, you will be able to use "chmod" on it to restore its permissions.

mkdir testdir2
mkdir: cannot create directory `testdir2': File exists
jschiwal@hpamd64:~> touch testdir2/testfile1
jschiwal@hpamd64:~> touch testdir2/testfile2
jschiwal@hpamd64:~> touch testdir2/testfile3
jschiwal@hpamd64:~> chmod 000 testdir2
jschiwal@hpamd64:~> ls testdir2
ls: cannot open directory testdir2: Permission denied
jschiwal@hpamd64:~> ls -ld testdir2
d--------- 2 jschiwal jschiwal 144 2007-04-03 07:39 testdir2
jschiwal@hpamd64:~> chmod 766 testdir2
jschiwal@hpamd64:~> ls -l testdir2
total 0
-rw------- 1 jschiwal jschiwal 0 2007-04-03 07:40 testfile1
-rw------- 1 jschiwal jschiwal 0 2007-04-03 07:40 testfile2
-rw------- 1 jschiwal jschiwal 0 2007-04-03 07:40 testfile3


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
You must have superuser privileges Markit0s Linux - Newbie 7 07-28-2006 03:28 PM
privileges problems slinky2004 Slackware 12 10-15-2004 07:42 PM
How do I get ALL privileges? Fe98 Linux - Newbie 6 09-30-2003 05:02 PM
privileges for kppp allelopath Linux - General 2 09-10-2003 08:41 PM
user privileges rieta Linux - Newbie 9 08-29-2002 12:48 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:19 AM.

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