Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

EDIT
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
add comment

2 Answers

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
add comment

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 : http://www.yolinux.com/TUTORIALS/LinuxTutorialManagingGroups.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.