Problems with SAMBA and Permissions
Posted: 2018/10/19 14:11:51
Hi,
I'm trying to setup a LAMP, I use windows and mac computers. I share the www folder over samba, so is easy to make any changes on my web projects.
Lest take a look to my smb.conf:
As I have now, i connect over my mac, to the server (using user256 account) and i can write folders, create new files, and delete them.
BUT, when i try to edit the files with any APP (over my mac), i can't.
Here is the folders:
Inside html i got:
This was the file i create:
If i change to this in my smb.conf to:
That could solve my problem, but them when i update my final work on the production FTP i need to manually change all the permission for file and folder to the right one (755 - 644)
Also i don't understand how, if im the owner of the file, and the folder, i can't modify it. Any idea what is the problem?
Thanks
I'm trying to setup a LAMP, I use windows and mac computers. I share the www folder over samba, so is easy to make any changes on my web projects.
Lest take a look to my smb.conf:
Code: Select all
[user256@256test 2001]$ testparm -s
Load smb config files from /etc/samba/smb.conf
Processing section "[apache]"
Loaded services file OK.
Server role: ROLE_STANDALONE
# Global parameters
[global]
dns proxy = No
load printers = No
log file = /var/log/samba/log.%m
max log size = 50
netbios aliases = 256test
idmap config * : backend = tdb
create mask = 0644
delete readonly = Yes
force create mode = 0644
force directory mode = 0755
locking = No
read only = No
valid users = user256
write list = user256 @user256
[apache]
comment = WWW
path = /var/www/html
As I have now, i connect over my mac, to the server (using user256 account) and i can write folders, create new files, and delete them.
BUT, when i try to edit the files with any APP (over my mac), i can't.
Here is the folders:
Code: Select all
[user256@256test www]$ ls -la
total 4
drwxr-xr-x. 4 root root 31 Jun 27 14:49 .
drwxr-xr-x. 24 root root 4096 May 11 03:55 ..
drwxr-xr-x. 2 root root 6 Jun 27 14:49 cgi-bin
drwxr-xr-x. 8 root root 72 Oct 19 12:03 html
Code: Select all
[user256@256test html]$ ls -la
total 8
drwxr-xr-x. 8 root root 72 Oct 19 12:03 .
drwxr-xr-x. 4 root root 31 Jun 27 14:49 ..
drwxrwxr-- 3 user256 user256 61 Oct 19 14:44 2001
drwxrwxr-- 3 user256 user256 89 Oct 19 10:11 2002
drwxrwxr-- 2 user256 user256 6 Oct 19 11:58 2004
drwxrwxr-- 6 user256 user256 4096 Nov 28 2017 2006
drwxrwxr-- 7 user256 user256 85 Mar 15 2018 2008
drwxrwxr-- 9 user256 user256 4096 Oct 19 11:44 2010
This was the file i create:
Code: Select all
[user256@256test 2001]$ ls -la
total 4
drwxrwxr-- 2 user256 user256 20 Oct 19 15:04 .
drwxr-xr-x. 8 root root 72 Oct 19 12:03 ..
-rw-r--r-- 1 user256 user256 4 Oct 19 11:20 1ss.txt
If i change to this in my smb.conf to:
Code: Select all
force create mode = 0777
force directory mode = 0777
create mask = 0777
Also i don't understand how, if im the owner of the file, and the folder, i can't modify it. Any idea what is the problem?
Thanks