LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-16-2016, 02:51 PM   #1
BirdfromtheSouthpole
LQ Newbie
 
Registered: Mar 2014
Posts: 7

Rep: Reputation: Disabled
Ubuntu1604 Samba File permission issue


Hello everyone,

I've a small issue with my lab at home and samba.
I use a Ubuntu 1604 Server in a VM Workstation environment, installed Samba and performed a basic config.
However, let me first explain what issue I have, before I come to the details.

Under /srv there is a "testshare" folder with an overall permission of 777, inside of it, I touched some txt as root. Those files are all owned by root, no one else. So, when I remote connect to my mounted samba share as a regular user (with username/password)and the bash, I only can see those root files, not edit them...ok, logical and all perfect.
BUT, when I use a file explorer like files or nautilus, or even the MS Windows Explorer,...I can edit all root files.
The ownership changes immediately to the users name. Same with a remote PowerShell. The difference is, that I use the CIFS Path //server/share notation instead of mounting the path.

Seems that file permissions only work by mounting it like mount -t CIFS etc.

How can I change it, so that file permission get inherited?

My smb.conf looks like this

[global]
security=user

[testshare]
comment=blabla
path=/srv/testshare
readonly=no
inherit acls=yes
browseable=yes
guest ok=no


I highly appreciate any information to it, I read the readhat and ubuntu manuals and some other sources, and I feel I missed something essential. I'm not new to linux nor IT stuff...but samba is.
 
Old 12-16-2016, 05:43 PM   #2
Ratamahatta
Member
 
Registered: Feb 2012
Location: Germany
Distribution: siduction
Posts: 134

Rep: Reputation: 17
I guess for permissions on just some (and not all) files I'd try to use the 'force user' option on the share (and set it to some less privileged user). Maybe that will make sure root's files remain untouched?
Do you think this approach is applicable?
 
Old 12-17-2016, 02:27 AM   #3
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
Quote:
Under /srv there is a "testshare" folder with an overall permission of 777, inside of it, I touched some txt as root. Those files are all owned by root, no one else. So, when I remote connect to my mounted samba share as a regular user (with username/password)and the bash, I only can see those root files, not edit them...ok, logical and all perfect.
Did you try editing them? I supposed you should be able to edit them no problem because of very relaxed permission.
 
  


Reply

Tags
permission, samba



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] samba permission issue unable to change uid nutjob16 Linux - Server 4 01-24-2015 05:24 PM
samba file permission & build_sam_account issue in samba cnt Linux - Server 5 08-10-2011 01:19 PM
File permission issue ZAMO Linux - Security 2 08-20-2008 06:55 AM
Permission issue when accessing share using Samba hishii Linux - Software 4 01-01-2006 11:01 PM
Samba share permission issue cbekannan Linux - Security 4 03-11-2005 03:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration