LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ownerships/permissions in sub-directories? (https://www.linuxquestions.org/questions/linux-newbie-8/ownerships-permissions-in-sub-directories-749910/)

fadinader 08-24-2009 07:11 AM

ownerships/permissions in sub-directories?
 
hello,
i wanna change the ownership of a folder so i typed:

chown -R fadi:fadi /mnt/collection

this changed all the subfolders in collection, but it didn't change the files permission !!

can anybody help me plz :)

fadinader 08-24-2009 07:12 AM

files permission
 
hello,
i wanna change the ownership of a folder so i typed:

chown -R fadi:fadi /mnt/collection

this changed all the subfolders in collection, but it didn't change the files permission !!

can anybody help me plz :)

fadinader 08-24-2009 07:19 AM

files permission
 
i used the -R option but it changed all the subfolder not the files included .... can anybody help :)

acid_kewpie 08-24-2009 07:21 AM

Please don't hijack threads, please don't drag up dead threads, and please don't post the same question multiple times

acid_kewpie 08-24-2009 07:22 AM

Please don't hijack threads, please don't drag up dead threads, and please don't post the same question multiple times

malekmustaq 08-24-2009 07:40 AM

fadinader,

If ownership was changed by that command you can change permissions by doing this:

user@host--$: chmod -R 775 /mnt/collection

---------------

Next time if you need help you may start your own new post. Some people here do not welcome hitch-riding or thread-hijacking for often times this will increase confusion. Here I am not confused so I offer you a side-help.

I hope this will help.

Good luck.

repo 08-24-2009 07:50 AM

please post the command you used.
Any error messages?

fadinader 08-24-2009 07:57 AM

i used chown -R fadi /mnt/collection

- no errors

- all subfolders were owned by fadi

- but all files are still owned by root

fadinader 08-24-2009 08:14 AM

Files permission
 
i want to change the ownership of a folder and all things in it,

i typed "chown -R fadi /mnt/collection"

- all the subfolders was owned by "fadi"

- but all files are still owned by root user

note that the permission of the folder is "drwxrwx---"

all i want is to change all the files ownership to user "fadi"

thanks

joeBuffer 08-24-2009 08:19 AM

If they're owned by root to begin with, use sudo
Code:

sudo chown -R fadi /mnt/collection

fadinader 08-24-2009 08:19 AM

i'm sry i did'nt know :)
an thank u for helping but i did this

anywayz i started a new treat as u told me

thanks

fadinader 08-24-2009 08:23 AM

yes i did this as root

joeBuffer 08-24-2009 08:24 AM

Do you mean that the group owner is root, like:
fadi:root?
If so, what is your group? How are your files displayed in the file listing, if you use ls -l? fadi:your_group?
Whatever your group is, just use
Code:

sudo chown -R fadi:your_group /mnt/collection

fadinader 08-24-2009 08:29 AM

root@debian:/mnt/collection/fadi# ls -l
total 836
drwxrwx--- 1 fadi fadi 4096 2009-08-22 16:44 4 linux
-rw------- 1 root root 44277 2009-05-07 16:45 CI-2-hearing-aid.pdf
-rw------- 1 root root 23629 2009-08-01 22:47 config.xml
drwxrwx--- 1 fadi fadi 0 2009-08-20 13:53 Dave’s Tech Blog » Blog Archive » From The Linux Terminal To Shell Scripts_files
-rw------- 1 root root 39146 2009-08-20 13:53 Dave’s Tech Blog » Blog Archive » From The Linux Terminal To Shell Scripts.html
-rw------- 2 root root 299008 2009-05-25 19:27 Introduction to.doc
-rw------- 1 root root 245760 2009-05-25 12:20 machines.tar
-rw------- 1 root root 49152 2009-08-23 04:12 mej.doc
drwxrwx--- 1 fadi fadi 0 2009-07-17 13:41 Music
-rw------- 1 root root 66048 2009-05-08 22:22 Output with switch closed.doc
drwxrwx--- 1 fadi fadi 8192 2009-04-25 15:25 Pictures
drwxrwx--- 1 fadi fadi 40960 2009-08-07 20:18 Sources
-rw------- 1 root root 23552 2008-06-18 13:07 Thumbs.db


all folders have been changed
all files does not changed

repo 08-24-2009 08:32 AM

Try
Code:

chmod -R 775 /mnt/collection
chown -R fadi:fadi /mnt/collection

What is the filesystem?

fadinader 08-24-2009 08:45 AM

i don't understand what do u mean by filesystem

and nothing was changed whan i typed chmod -R 775 /mnt/collection

it says operation not supported next to each file.

repo 08-24-2009 08:49 AM

you are doing this as root?
Is it ntfs or fat32 ?
Is this a windows partition?

schneidz 08-24-2009 08:50 AM

this will help us understand the filesystem
Code:

pwd; mount; df -h

fadinader 08-24-2009 08:52 AM

yes as root

ntfs

no it is a normal drive

repo 08-24-2009 08:53 AM

Take a look at the thread you highjacked before, they offer a solution.
http://www.linuxquestions.org/questi...anging-600649/

fadinader 08-24-2009 08:54 AM

debian:/mnt/collection# pwd; mount; df -h
/mnt/collection
/dev/sda7 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda1 on /mnt/xp type ntfs (rw)
/dev/sda5 on /mnt/coptics type ntfs (rw)
/dev/sda8 on /mnt/others type ntfs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/dev/sda6 on /mnt/collection type ntfs (rw)
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 5.8G 2.1G 3.5G 38% /
tmpfs 502M 0 502M 0% /lib/init/rw
udev 10M 96K 10M 1% /dev
tmpfs 502M 0 502M 0% /dev/shm
/dev/sda1 20G 11G 9.4G 53% /mnt/xp
/dev/sda5 45G 35G 11G 77% /mnt/coptics
/dev/sda8 42G 35G 7.4G 83% /mnt/others
/dev/sda6 37G 29G 8.6G 77% /mnt/collection

schneidz 08-24-2009 09:41 AM

^
Code:

/dev/sda6 on /mnt/collection type ntfs (rw)
i dont think ntfs supports unix style permissions.

maybe since it is mounted by root all the files assume the ownership of root ?

who owns /mnt/collection ?
maybe:
Code:

umount /mnt/collection
chmod 777 /mnt/collection
chown fadi /mnt/collection
chgrp <group> /mnt/collection
mount /dev/sda6 /mnt/collection -t ntfs -o rw

maybe then the files below will assume the owner as fadi; else you mite have better luck chown-ing the files then ?

fadinader 08-24-2009 09:45 AM

maybe it's right but why i couldn't change the files ownership ?

fadinader 08-24-2009 09:47 AM

the problem is in the ntfs fromat ?

fadinader 08-24-2009 09:49 AM

fadi own all folder
but root own all files

fadinader 08-24-2009 09:53 AM

fadi owns all folders

root owns all files

repo 08-24-2009 10:00 AM

Take a look at
http://www.linux-ntfs.org/doku.php?i...an_ntfs_volume

fadinader 08-24-2009 10:00 AM

nothing has changed

mushroomboy 08-24-2009 10:01 AM

Quote:

Originally Posted by fadinader (Post 3655542)
the problem is in the ntfs fromat ?

Yeah if it's ntfs the current ntfs built-in support has buggy rw so it's normally only rw for root. hence why all files are owned by root. You might want to download ntfs-3g for your distro and then mount the device for ntfs-3g instead of ntfs.

fadinader 08-24-2009 10:19 AM

thanks alot to all

i installed the ntfs-3g package and it works normally

repo 08-24-2009 10:26 AM

You can mark the thread as solved if you want.

Tinkster 08-24-2009 12:04 PM

I've cleaned up your mess and merged the three hi-jacked threads posts
with the one you started. Please don't double-post, please don't hi-jack
others threads. Both is considered very rude behaviour on these boards.



Cheers,
Tink


All times are GMT -5. The time now is 11:21 AM.