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

Notices


Reply
  Search this Thread
Old 07-07-2013, 10:18 PM   #1
solidium
LQ Newbie
 
Registered: Jul 2013
Distribution: Linux Mint 15
Posts: 1

Rep: Reputation: Disabled
chmoded a directory now everything look like file


ok this is my first post so please bear with me

i am in the process of encrypting all my drives so i put all my files that i wanted backed up on my new 4TB drive that i just bought and encrypted with LUKS.

i used the whole drive

when i mount it some files i could read and some i could not, this was a pain as i would watch shows off it as i was encrypting my old drives.

so i had the not so brillant idea as to chmod 764 to the directory i had the drive mounted to. i retrospect i think i shouldve use the chown command, my bad, lol.

but now the problem i am faced with is everything seems to be a file so i cant browse the drive

http://i1296.photobucket.com/albums/...ps4ed8aa72.png

i looked at it in a terminal and there is no permissions for anything just a bunch of question marks

http://i1296.photobucket.com/albums/...ps1d796adf.png

now my question is can i reverse these permission to what they used to be from a command, like undo-chmod, lol
or how do i get the folders to go back to being browsable like normal

i was considering photorec but i have never used it and my source drive is 4TB and all my other drives are 2TB

any help on the matter would be appriecated as i do not want to loose these files that i have spent 10+ years acquiring


[UPDATE]

i solved my problem
i had to open a root terminal and use chown - R <username> <directory_where_drive_mounted> and i also used chgrp - R <username> <directory_where_drive_mounted>
after i did that i found that the permissions were actually applied like i initailly wanted

Last edited by solidium; 07-08-2013 at 10:20 AM.
 
Old 07-08-2013, 01:16 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Let me just explain something here: You cant descend into a directory without 'execute' permission.
So you could also just have done "chmod -R 755 <directory_where_drive_mounted>"
 
Old 07-08-2013, 03:14 PM   #3
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Try the find command with the -d option. That should only list directories. I'm to loaded to check the web or manpage but something like that could help.
Code:
find /path/your/drive/is/mounted -d -exec chmod 755 $1 ;
The command is wrong but the manpage of find is great and has lots of examples. Check it out.
 
  


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
su:warning: cannot change directory to home/orausr: No such file or directory cdhar Linux - Newbie 4 09-11-2012 06:17 AM
Get first file of directory then copy to other directory andd rename the file Faye Linux - Software 4 01-30-2011 09:16 AM
Copying a single file into each directory of a directory tree mlapl1 Linux - Newbie 2 06-27-2007 10:18 PM
How to protect a file/directory in your home login directory (RH Linux) jitsenho Linux - Security 9 07-03-2006 11:08 PM
what should /usr/sbin/sendmail be chmoded to? ShawnD Linux - General 3 08-23-2002 12:57 PM

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

All times are GMT -5. The time now is 10:11 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
Open Source Consulting | Domain Registration