Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 set up an Ubuntu server (12.04 LTS) for samba file sharing. The problem I'm having has to do with files that I create on the server. Other users can't open them because I created them under a group that is my username, instead of the group that is allowed to view the share. Why is this? It seems that everything else is working fine. Only allowed users are able to view their share folders but they can't open anything that I create.

share|improve this question
chmod -R g+s /media got the job done – Craig Smith Nov 21 '12 at 7:55

Because as far as the system is concerned there is no necessity to change the group ownership of the file being created away from the default group of the user creating it.

If you want file to have automatic group ownership make the directory where you are creating the files a SETGID directory.

share|improve this answer

Your Answer


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.