LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 04-03-2007, 05:04 AM   #1
setkos
LQ Newbie
 
Registered: Mar 2006
Posts: 21

Rep: Reputation: 15
Directory privileges


Hello,

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 stupid...is there any way to mange this issue without root action...?
 
Old 04-03-2007, 06:08 AM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
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 06:10 AM.
 
Old 04-03-2007, 12:10 PM   #3
setkos
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, 12:21 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

demonstration:
Code:
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
 
  


Reply



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 02:28 PM
privileges problems slinky2004 Slackware 12 10-15-2004 06:42 PM
How do I get ALL privileges? Fe98 Linux - Newbie 6 09-30-2003 04:02 PM
privileges for kppp allelopath Linux - General 2 09-10-2003 07:41 PM
user privileges rieta Linux - Newbie 9 08-29-2002 11:48 AM

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

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