Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two partitions and one of them had been formated under NTFS. Ubuntu sees it like /media/DOCS. I have a web site in /media/DOCS/Dropbox/AuthoringTool_Working.
I have configured Apache and created a virtual host. When I tr to open this site it says Permission denied. I tried to change owner into www-data but have not success. I used sudo chgrp -R www-data /media/DOCS/Dropbox.
What am I doing wrong?

It is mounted like this /dev/sda5 /media/DOCS fuseblk rw,nosuid,nodev,allow_other,blksize=4096,default_permissions 0 0

share|improve this question
up vote 1 down vote accepted

The NTFS filesystem does not support POSIX-style file ownership or permissions.

Some recent ntfs-3g versions have support for NTFS Owner and ACL features. I'm not sure if they are already included in Ubuntu (which usually prefers rock-solid software to new features), but from the default_permissions option in your example it does seem that your system has this support.

To change a file's owner, there must be a mapping of NTFS (Windows) SIDs to your machine's user IDs. An easy way to create such a mapping is to use usermap.

However, if a user (www-data) only exists on the Linux side, you will need to manually add it to the mapping file. (This also means that the owner will display as "unknown" when using that disk on Windows.)

And as tamtakos already answered, to change the owner you use chown, not chgrp.

share|improve this answer

chgrp, as the name suggests changes the group. To change the owner of a file/directory you have to use the chown command. Of course, you can change both at the same time by doing chown root:root file Which will make 'file' belong to the root user, as well as the root group. More details on users and groups can be found here for example :

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .