Solved

take ownership of directory

Posted on 2014-02-22
3
307 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
Comment Utility
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
Comment Utility
>>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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now