Ubuntu server - Access denied UNTIL login with root user

2

I have a machine running Ubuntu Server 12.04.2. I have a folder /home/shared_folder This folder is shared in samba. When i try to access the folder in windows, it does not show the folder's content, just two files: Access-your-private.data.desktop, and a readme.txt. When trying to open both files it gives me "Access denied". But if i try to login on the machine (even with Putty), it works as expected. It shows the correct content of the folder and not these two files. It will work as long as the user is logged in, when i close Putty connection or log out from the user, the problem starts again.

What is causing this error?

Mateus Viccari

Posted 2014-10-02T14:36:25.617

Reputation: 143

Answers

1

That looks like an encrypted home directory.

When you ssh in (putty) the decrypted contents are mounted from /home//.Private (IIRC) over /home/ to give you access to those files. Samba doesn't have access to your password/passphrase so can't access your encrypted files.

Douglas Leeder

Posted 2014-10-02T14:36:25.617

Reputation: 1 375

1Yeah looks like that's it. The guy who installed ubuntu thought it would be good to encrypt the home folder. Gonna move my files to another shared folder outside home. – Mateus Viccari – 2014-10-02T16:42:39.813

1

When I mounted a share on my Linux Mint box from Windows, I saw these 2 files:

Access-your-private.data.desktop readme.txt

All I had to do was add the following to the /etc/samba/smb.conf file and restart:

usershare allow guests = yes

Jim Dunn

Posted 2014-10-02T14:36:25.617

Reputation: 11