Permissão de acesso a pastas do File server no Ubuntu-Server 22.04

1. Permissão de acesso a pastas do File server no Ubuntu-Server 22.04

fabio leme
COFFE

(usa Debian)

Enviado em 05/03/2024 - 11:01h

Bom dia
montei um file server no ubuntu server 22.04 e estou com problemas para dar permissão de acesso,
a minha estrutura de pastas, hoje em uso.
{{ História, nosso file-server antigo estava funcionando mas as permissões de pastas estavam bagunçadas, todo mundo podendo fazer o que quiser,
estava montando o nosso file server atual em paralelo para poder testar as permissões ai o file server antigo queimou a fonte, tivemos que fazer
a virada para o file-server atual as pressas. Como tinha todo o backup Full, criamos o file-server novo e voltamos o backup, mantendo as permissões antigas}}.
Peguei uma pasta que não tem impacto para realizar os testes, minha estrutura esta assim.
Compartilhamento pasta principal:
->Setores
--->Comercial
--->Compartilhamento Publico e Temporarios
--->Corporate Service
--->Desenvolvimento
--->Fotos
--->Marketing
--->Operaçoes
--->Permissão
--->Portaria
--->RH & Almoxarifado
--->Scanner
--->TI

A guia segurança da pasta raiz Setores está assim.
Dono da pasta: root(Unix User\root)

Grupos Usuarios adicionados: Acesso: Membro de:
Administrator(usuario) Controle Total Administrators, Domain Admins, Domain Users, Enterprise Admins, G_ADMINISTRADORES_FULL, Group Policy Creator Owers, Schema Admins
Domains Admins Nenhum Administrators, G_ADMINISTRADORES_FULL, Denied RODC Password Replication Group
Todos Nenhum
root (Unix User\root) Controle Total
nogroup (Unix Group\nogroup) Nenhum
DL_USUARIOS_FS Ler e Executar G_USUARIOS_FS
DL_ADMINISTRADORES_FULL Controle Total G_ADMINISTRADORES_FULL
Sistema Controle Total
Proprietario Criador Controle Total
Grupo Criador Nenhum

A pasta que preciso de acesso é a pasta /Setores/Portaria

Grupos Usuários adicionados: Acesso: Membro de:
Administrator(usuário) Controle Total Administrators, Domain Admins, Domain Users, Enterprise Admins, G_ADMINISTRADORES_FULL, Group Policy Creator Owers, Schema Admins
Proprietário Criador Controle Total
Grupo Criador Nenhum
DL_ADMINISTRADORES_FULL Controle Total G_ADMINISTRADORES_FULL
PORTARIA Leitura
Todos Nenhum

Com essas permissões eu vejo a pasta e não tenho acesso a ela, aparece a mensagem O windows não pode acessar \\10.1.0.55\Setores\Portaria

Tentei configurar as permissões de acesso a pastas pelo RSAT mas não deu certo ele não aplica na pasta


  


2. Re: Permissão de acesso a pastas do File server no Ubuntu-Server 22.04

Daniel Lara Souza
danniel-lara

(usa Fedora)

Enviado em 05/03/2024 - 11:22h


como esta o seu smb.conf ?


3. Re: Permissão de acesso a pastas do File server no Ubuntu-Server 22.04

fabio leme
COFFE

(usa Debian)

Enviado em 05/03/2024 - 14:06h


danniel-lara escreveu:


como esta o seu smb.conf ?


Segue smb.conf do fileserver

# Global parameters
[global]
netbios name = SERV-SP-FILES
dedicated keytab file = /etc/krb5.keytab
kerberos method = secrets and keytab
realm = AGRISTAR.PDC
security = ADS
server role = member server
winbind refresh tickets = Yes
workgroup = AGRISTAR
idmap config samdom : range = 10000 - 999999
idmap config samdom : backend = rid
idmap config * : range = 3000-7999
idmap config * : backend = tdb
map acl inherit = Yes
vfs objects = acl_xattr

##################Oculta pastas que o usuario não tem permissão
hide unreadable = yes
hide unwriteable files = no
################# Modificao para Windowns XP/2003
ntlm auth = YES

#Retrocompatibilidade - Para Server 2003
min protocol = NT1
#server min protocol = NT1
# lanman auth = yes
map to guest = Bad User
[share]
path = /media/share
read only = no


[Install]
comment = Install
inherit acls = Yes
path = /fileserve/Install/
locking = no
read only = no
#browsable = yes
guest ok = yes


[ISOs]
comment = Install
inherit acls = Yes
path = /fileserve/Install/.ISOs
locking = no
read only = no
#browsable = yes
guest ok = yes

# comment = Home
# path = /file-server/data/Homes/
# read only = No

#Shadow Copies
# vfs objects = shadow_copy2
# shadow:snapdir = /mnt/DADOS/SnapShot
# shadow:sort = desc
# shadow:format = @SNPFILESERSAP_%Y.%m.%d-%H.%M.%S
# shadow:localtime = yes



[Setores]
comment = Setores
path = /fileserve/data/Setores
inherit permissions = Yes
inherit acls = Yes
map acl inherit = Yes
#browsable = no
writable = yes
locking = no
read only = no
veto files =/*.mp3/*.avi/*.mpg/*.wma
#Shadows Copies
vfs objects = shadow_copy2
shadow:snapdir = /mnt/DADOS/SnapShot/
shadow:sort = desc
shadow:format = @SNPFILESERSAP_%Y.%m.%d-%H.%M.%S
shadow:localtime = yes




[Certificados]
comment = Setores
path = /fileserve/data/Certificados-Digitais
inherit permissions = Yes
inherit acls = Yes
map acl inherit = Yes
#browsable = no
writable = yes
locking = no
read only = no
veto files =/*.mp3/*.avi/*.mpg/*.wma
#Shadow Copies
vfs objects = shadow_copy2
shadow:snapdir = /mnt/DADOS/SnapShot/
shadow:sort = desc
shadow:format = @SNPFILESERSAP_%Y.%m.%d-%H.%M.%S
shadow:localtime = yes

#[DADOS_GO]
# comment = Setores
# path = /mnt/serv-ozn-pdc01
# inherit permissions = Yes
# inherit acls = Yes
# map acl inherit = Yes
browsable = yes
# writable = yes
# locking = no
# read only = no
# veto files =/*.mp3/*.avi/*.mpg/*.wma



[Diretoria$]
comment = Diretores
path = /fileserve/data/Diretoria/
inherit permissions = Yes
inherit acls = Yes
map acl inherit = Yes
#browsable = no
writable = yes
locking = no
read only = no
#Shadows Copies
vfs objects = shadow_copy2
shadow:snapdir = /mnt/DADOS/SnapShot/
shadow:sort = desc
shadow:format = @SNPFILESERSAP_%Y.%m.%d-%H.%M.%S
shadow:localtime = yes


[RH$]
comment = Setor RH
path = /fileserve/data/RH/
inherit permissions = Yes
inherit acls = Yes
map acl inherit = Yes
#browsable = no
writable = yes
locking = no
read only = no
#Shadows Copies
vfs objects = shadow_copy2
shadow:snapdir = /mnt/DADOS/SnapShot/
shadow:sort = desc
shadow:format = @SNPFILESERSAP_%Y.%m.%d-%H.%M.%S
shadow:localtime = yes



# [TI$]
# comment = Setor TI
# path = /file-server/data/TI/
# inherit permissions = Yes
# inherit acls = Yes
# map acl inherit = Yes
# #browsable = no
# writable = yes
# locking = no
# read only = no

# #Shadow Copies
# vfs objects = shadow_copy2
# shadow:snapdir = /mnt/DADOS/SnapShot
# shadow:sort = desc
# shadow:format = @SNPFILESERSAP_%Y.%m.%d-%H.%M.%S
# shadow:localtime = yes



[DADOS_G]
comment = Dados G
path = /fileserve/data/data_g/
read only = No
#browsable = no
force create mode = 0777
force directory mode = 0777
inherit permissions = Yes
inherit acls = Yes
map acl inherit = Yes
force user = root
#Shadows Copies
vfs objects = shadow_copy2
shadow:snapdir = /mnt/DADOS/SnapShot/
shadow:sort = desc
shadow:format = @SNPFILESERSAP_%Y.%m.%d-%H.%M.%S
shadow:localtime = yes
#force user = administrador
#force group = administrador
#read only = No
#guest ok = Yes
#locking = No
#oplocks = No

#[BKP_NOVO]
# comment = BKP_NOVO
# path = /mnt/bkp_novo
# read only = No
#browsable = no
# force create mode = 0777
# force directory mode = 0777
# veto files =/*.mp3/*.avi/*.mpg/*.wma

#Shadow Copies
# vfs objects = shadow_copy2
# shadow:snapdir = /mnt/DADOS/SnapShot
# shadow:sort = desc
# shadow:format = @SNPFILESERSAP_%Y.%m.%d-%H.%M.%S
# shadow:localtime = yes
#[data]
# path = /file-server/data/
# inherit permissions = Yes
# inherit acls = Yes
# map acl inherit = Yes
# browsable =yes
# writable = yes
# locking = no
# read only = no
#Shadow Copies
# vfs objects = shadow_copy2
# shadow:snapdir = /mnt/DADOS/SnapShot
# shadow:sort = desc
# shadow:format = @SNPFILESERSAP_%Y.%m.%d-%H.%M.%S
# shadow:localtime = yes

[Etiquetas]
path = /fileserve/data/setores/Operações/Etiquetas e Gravuras
inherit permissions = Yes
inherit acls = Yes
map acl inherit = Yes
#browsable = no
writable = yes
locking = no
read only = no
veto files =/*.mp3/*.avi/*.mpg/*.wma
#Shadow Copies
vfs objects = shadow_copy2
shadow:snapdir = /mnt/DADOS/SnapShot/
shadow:sort = desc
shadow:format = @SNPFILESERSAP_%Y.%m.%d-%H.%M.%S
shadow:localtime = yes




4. Re: Permissão de acesso a pastas do File server no Ubuntu-Server 22.04

Daniel Lara Souza
danniel-lara

(usa Fedora)

Enviado em 05/03/2024 - 15:12h


digita ai

ls -la /fileserve/data/Setores/

vamos ver as permissões


5. Re: Permissão de acesso a pastas do File server no Ubuntu-Server 22.04

fabio leme
COFFE

(usa Debian)

Enviado em 05/03/2024 - 16:51h


danniel-lara escreveu:


digita ai

ls -la /fileserve/data/Setores/

vamos ver as permissões


Boa tarde
segue as permissões

root@SERV-SP-FILES:~# ls -la /fileserve/data/Setores/
total 6968
drwxrwx---+ 15 root nogroup 4096 Feb 29 14:48 .
drwxrwxr-x 7 root 3000018 4096 Feb 18 11:44 ..
-rwxrwx---+ 1 AGRISTAR\daiana.moura AGRISTAR\domain users 6843540 Feb 27 10:04 20240227_095723_008618.pdf
-rwxrwx---+ 1 AGRISTAR\gabriela.caiado AGRISTAR\domain users 676 Feb 23 10:49 'ARQUIVOS (SERV-SP-WTS02UsersProfiles) (S) - Atalho.lnk'
drwxrwx---+ 35 nobody nogroup 4096 Feb 16 16:48 Comercial
drwxrwx---+ 4 3000000 3000003 4096 Mar 5 09:03 'Compartilhamento Publico e Temporarios'
drwxrwx---+ 20 root 3000018 4096 Feb 16 16:46 'Corporate Services'
-rwxrwx---+ 1 AGRISTAR\administrator AGRISTAR\domain admins 13076 Nov 25 16:03 Correio.docx
drwxrwx---+ 33 root 3000050 4096 Feb 5 14:04 'Desenvolvimento de Produtos (P & D)'
-rwxrwx---+ 1 AGRISTAR\administrator AGRISTAR\domain admins 4096 Nov 25 16:03 ._.DS_Store
-rwxrwx---+ 1 AGRISTAR\administrator AGRISTAR\domain admins 8196 Nov 25 16:03 .DS_Store
drwxrwx---+ 9 3000001 3000013 4096 Aug 7 2023 FISPQ
drwxrwxr-x+ 19 root 3000018 4096 Aug 7 2023 Fotos
drwxrwx---+ 18 root 3000018 4096 Dec 18 15:41 Marketing
drwxrwx---+ 25 AGRISTAR\administrator 3000018 4096 Dec 29 16:28 Operações
drwxrwx---+ 2 3000000 3000003 4096 Aug 31 2023 Permissao
drwxrwx---+ 4 AGRISTAR\administrator AGRISTAR\dl_administradores_full 4096 Feb 8 09:18 Portaria
-rwxrwxr-x+ 1 AGRISTAR\administrator AGRISTAR\domain admins 8038 Nov 25 16:03 RAMAIS.xlsx
drwxrwx---+ 3 root 3000018 4096 Oct 23 19:30 'RH & ALMOXARIFADO'
drwxrwxrwx+ 3 root 3000018 69632 Mar 5 16:49 Scanner
-rwxrwx---+ 1 AGRISTAR\administrator AGRISTAR\domain admins 25088 Feb 22 14:34 Thumbs.db
drwxrwx---+ 84 AGRISTAR\administrator 3000013 4096 Feb 29 14:48 TI


6. Re: Permissão de acesso a pastas do File server no Ubuntu-Server 22.04

Daniel Lara Souza
danniel-lara

(usa Fedora)

Enviado em 05/03/2024 - 17:25h


digita ai

getfacl /fileserve/data/Setores


7. Re: Permissão de acesso a pastas do File server no Ubuntu-Server 22.04

fabio leme
COFFE

(usa Debian)

Enviado em 05/03/2024 - 18:42h


danniel-lara escreveu:


digita ai

getfacl /fileserve/data/Setores


agristar@SERV-SP-FILES:/$ getfacl /fileserve/data/Setores
getfacl: Removing leading '/' from absolute path names
# file: fileserve/data/Setores
# owner: root
# group: nogroup
user::rwx
user:AGRISTAR\\administrator:rwx
group::---
group:AGRISTAR\\domain\040admins:---
group:NT\040Authority\\system:rwx
group:AGRISTAR\\dl_administradores_full:rwx
group:AGRISTAR\\dl_usuarios:r-x
group:AGRISTAR\\dl_diretoria_steven:rwx
mask::rwx
other::---
default:user::rwx
default:user:AGRISTAR\\administrator:rwx
default:group::---
default:group:AGRISTAR\\domain\040admins:---
default:group:NT\040Authority\\system:rwx
default:group:AGRISTAR\\dl_administradores_full:rwx
default:mask::rwx
default:other::---



8. Re: Permissão de acesso a pastas do File server no Ubuntu-Server 22.04

fabio leme
COFFE

(usa Debian)

Enviado em 11/03/2024 - 18:18h


COFFE escreveu:


danniel-lara escreveu:


digita ai

getfacl /fileserve/data/Setores


agristar@SERV-SP-FILES:/$ getfacl /fileserve/data/Setores
getfacl: Removing leading '/' from absolute path names
# file: fileserve/data/Setores
# owner: root
# group: nogroup
user::rwx
user:AGRISTAR\\administrator:rwx
group::---
group:AGRISTAR\\domain\040admins:---
group:NT\040Authority\\system:rwx
group:AGRISTAR\\dl_administradores_full:rwx
group:AGRISTAR\\dl_usuarios:r-x
group:AGRISTAR\\dl_diretoria_steven:rwx
mask::rwx
other::---
default:user::rwx
default:user:AGRISTAR\\administrator:rwx
default:group::---
default:group:AGRISTAR\\domain\040admins:---
default:group:NT\040Authority\\system:rwx
default:group:AGRISTAR\\dl_administradores_full:rwx
default:mask::rwx
default:other::---


Verifiquei que o usuario administrador não esta tendo acesso, ai copiei o meu usuario e colocquei outro nome ai comoeçou a dar permissão
agora estou vendo como arrumar isso







Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts