LinuxQuestions.org
Review your favorite Linux distribution.
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 09-14-2023, 09:14 AM   #1
jerxjac
LQ Newbie
 
Registered: Sep 2023
Posts: 2

Rep: Reputation: 0
Change permissions - permission denied


I try to recover a HDD from my NAS, using Diskinternals linux reader (program running under Windows) but one folder had the rights specifically for one user.
So I now have the problem that I can’t copy/move this folder and it’s files.
I tried under Linux different chmod with as last chmod -R 777 ./ But that didn’t work

How can I change the rights to the Stack folder, it looks like i'm missing rwx on the 3 last positions (when compared to the other)

Code:
drwxrwxrwx+ 13 root kali 4096 Aug 17 09:31 Public
drwxrwxrwx+  2 root kali 4096 Dec 11  2014 SmartWare
drwxrwx---+ 10 root kali 4096 Aug 25 08:21 Stack
drwxrwxrwx+  2 root kali 4096 Dec 11  2014 TimeMachineBackup
drwxrwx---+  2 root kali 4096 Sep  4 05:18 UserOne
 
Old 09-14-2023, 12:16 PM   #2
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
What is the OS used on the NAS and how is it configured?
The NAS itself is blocking access and using 'chmod -R 777 ./' is not really a good idea since that affects both directories and files under the stated beginning folder.

For other users to access either Stack or UserOne the NAS must be configured to allow that. Start with the config on the NAS and don't damage things with random chmod commands.
 
Old 09-14-2023, 12:55 PM   #3
jerxjac
LQ Newbie
 
Registered: Sep 2023
Posts: 2

Original Poster
Rep: Reputation: 0
The operating system of the NAS is based on Linux.
Problem is that the NAS does not work anymore so I had to remove the HDD.
No way to change the users permissions that way.

All I want now is to rescue my files and format the HDD to be used somewhere else

Is there a possibility to access and copy the folder 'Stack' ?

Last edited by jerxjac; 09-14-2023 at 01:18 PM.
 
Old 09-14-2023, 09:28 PM   #4
sydni77
LQ Newbie
 
Registered: Aug 2023
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by jerxjac View Post
The operating system of the NAS is based on Linux.
Problem is that the NAS does not work anymore so I had to remove the HDD.
No way to change the users permissions that way.

All I want now is to rescue my files and format the HDD to be used somewhere else

Is there a possibility to access and copy the folder 'Stack' ?
I have some options that you can try: geometry dash
  • Boot the HDD as an external drive on another Linux machine. Mount the drive and use sudo to override permissions and copy the Stack folder.
  • Boot the HDD on a Linux live USB. Access the filesystem from the live environment as root to bypass permissions.
  • Attach the HDD to another Windows machine using a SATA-to-USB adapter. Windows ignores Linux permissions so you can directly access the folders.
  • Use a Linux recovery boot disk that contains utilities like chroot and chmod to reset the file permissions on the HDD before copying.
  • As a last resort, use dd or a forensic utility to image the full HDD, mount the image, and extract the Stack folder with elevated permissions.

The key is booting the HDD on a system that gives you root access. Once bypassed, you can backup or copy out the Stack folder and reformat for reuse.

Last edited by sydni77; 09-14-2023 at 09:30 PM.
 
Old 09-22-2023, 10:15 PM   #5
rzdndr
Member
 
Registered: Aug 2023
Distribution: Slackware 15.0 x86_64
Posts: 68

Rep: Reputation: 8
This depends on the disks health status. If the disk is corrupted you might not be able to access the disk.

You can boot any Linux live system. Then mount the disk.

Switch user to root (using su). Then do a chmod 777 Stack. This might not work since you do not have a kali group on the live system. If that does not work you can use chmod o=rwx Stack. This will only change permissions for users not in the files group.

Last edited by rzdndr; 09-22-2023 at 10:17 PM.
 
  


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
[SOLVED] Execute permission set but permission denied when unlocking IronKey mdh524 Linux - Newbie 2 11-12-2015 09:36 PM
mkdir throws Permission Denied error in a directoy even with root ownership and 777 permission surajchalukya Linux - Security 14 09-03-2012 08:34 AM
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
'permission denied" inspite of right permission flags on network drive anirudhvij Linux - Enterprise 8 05-22-2007 05:57 AM
Need ACCESS to change files! Every time I try to change a setting,"Permission Denied" Balarabay1 SUSE / openSUSE 2 03-06-2006 09:54 AM

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

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