LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-16-2006, 09:53 PM   #1
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
CHMOD now perms for nothing


I was workin as root for so many days and as everyone told me not to use root I decide d to make a new user. But I couldn't play my mp3s as permission denied.

So i went into the dir and did
chmod a=rw -R *

now it turns out I have access to nothin even ls gives permission denied even though I am on su. Apart from reinstalling slackware what else can I do?
 
Old 10-16-2006, 10:42 PM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
You took out execute permissions from files. You can change the permission by mounting the partition with your Slackware CD, but it will take you a lot to restore the permissions manually. Search in this forum, i remember seeing a nice script to restore the permissions using MANIFEST from CD.

Edit: Here's one script to do it: http://homepages.paradise.net.nz/~cameronk/progs.html

Last edited by gbonvehi; 10-16-2006 at 10:47 PM.
 
Old 10-16-2006, 11:12 PM   #3
Mr_C
Member
 
Registered: Jan 2004
Location: Trinidad & Tobago
Distribution: Slackware
Posts: 317

Rep: Reputation: 30
Well to do it manually, go back to the folders that you messed up lol

Code:
chmod -R 0755 folder
chown -R root:users folder
This makes all the files and folders accessible.
The second adds ownership for the users group so that any other users can view/play only.
Now if you're like me and hate seeing green .mp3s do this
Code:
find ./ -name '*.mp3' -exec chmod -x {} \; 2>/dev/null
 
Old 10-18-2006, 12:15 AM   #4
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
hey Mr-C,
Your reply was a little late, I reinstalled Slackware before your reply. But tell me how would chmod work if I have removed all executable permissions?
BTW, I messed up the new installed too. http://www.linuxquestions.org/questi...28#post2467228
I guess I will have to format and reinstall.
 
Old 10-18-2006, 11:04 AM   #5
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
Hey, the
find ./ -name '*.mp3' -exec chmod -x {} \; 2>/dev/null

doesn't work whats wrong?
 
Old 10-18-2006, 11:24 AM   #6
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Quote:
Originally Posted by duryodhan
Hey, the
find ./ -name '*.mp3' -exec chmod -x {} \; 2>/dev/null

doesn't work whats wrong?
The syntax seems fine, it should work. Try removing the 2>/dev/null part (keep the ; sign, it's important there), it sends the error messages to /dev/null and maybe you are missing something
 
Old 10-18-2006, 12:59 PM   #7
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
Quote:
Originally Posted by duryodhan
Hey, the
find ./ -name '*.mp3' -exec chmod -x {} \; 2>/dev/null

doesn't work whats wrong?
You need to escape the {} characters with either a backslash or singlequotes. I personally prefer single quotes.
Code:
find . -name '*.mp3' -exec chmod -x '{}' \;
 
Old 10-18-2006, 01:31 PM   #8
Mr_C
Member
 
Registered: Jan 2004
Location: Trinidad & Tobago
Distribution: Slackware
Posts: 317

Rep: Reputation: 30
Thats peculiar; It works for me....did you try the single quotes as suggested?
 
  


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
chmod, external usb, vfat - can't chmod a directory itsjustme Slackware 2 04-02-2006 04:23 PM
changing perms on hd bernstein DamnSmallLinux 6 04-04-2005 09:47 PM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM
CHMOD in shell : chmod 777 /usr/ <---is that right? cpanelskindepot Programming 5 07-16-2004 05:37 AM
cdrw perms doralsoral Linux - Software 0 05-06-2004 10:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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