Solved

take ownership of directory

Posted on 2014-02-22
3
313 Views
Last Modified: 2014-03-15
Ive somehow lost ownership of a directory on an ext3 drive attached to my asus n56u.  I have terminal access to my router, but have very limited knowledge of linux.  there are a total of 4 folders on the drive.  I have write access to 2 out of 4 of the directories.  If i run a frisk -l, i get

Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               1      243201  1953512001  83 Linux

how can i switch to the drive and get ownership of the troubled directories?
0
Comment
Question by:colonialiu20
3 Comments
 
LVL 40

Expert Comment

by:omarfarid
ID: 39879709
You need to access the system as user root, then mount the filesystems, then as root you run

chown -R username:groupname /filesystem_mount

You need to put actual username , groupname and filesystem_mount
0
 
LVL 21

Accepted Solution

by:
Mazdajai earned 500 total points
ID: 39880015
>>how can i switch to the drive and get ownership of the troubled directories? See sample output:

# df -h
/dev/sda1             485M   34M  427M   8% /

Open in new window


To list the ownership:
# ls -lah /
total 114K
dr-xr-xr-x.  27 root root 4.0K Feb 22 20:17 .

Open in new window

0
 
LVL 13

Expert Comment

by:Sandy
ID: 39880263
this is just FS listing... Please provide directory names and the ownership details and use the same command which was provided by Mazdajai.

TY/SA
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question