Project

General

Profile

Bug #27881

Set the default setting for the SMB -> Sharing -> SMB -> Apply Default Permissions checkbox to checked

Added by Erin Clark over 1 year ago. Updated 11 months ago.

Status:
Done
Priority:
Important
Assignee:
Timur Bakeyev
Category:
OS
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Related projects 1 project

Description

As per ticket 26964 we want this setting to always be false except for when the user checks the box and saves. I have done the UI side of this in a PR but there may be some value in having the middleware set the db value to 0 as well so I am making a ticket for this

Screen Shot 2018-05-04 at 11.15.54 AM.png (38.6 KB) Screen Shot 2018-05-04 at 11.15.54 AM.png Created by the Wizard Bonnie Follweiler, 05/04/2018 08:19 AM
Screen Shot 2018-05-04 at 11.16.10 AM.png (78.8 KB) Screen Shot 2018-05-04 at 11.16.10 AM.png Adding an SMB share Bonnie Follweiler, 05/04/2018 08:19 AM
17211
17214

Related issues

Related to FreeNAS - Feature #26964: "Apply default permissions" in SMB share config is confusingDone
Related to FreeNAS - Bug #33084: The "Default Permissions" box is not checked when a new SMB share is createdDone
Related to FreeNAS - Bug #41784: Default permissions button gets untickedClosed

Associated revisions

Revision 61f20535 (diff)
Added by Timur I. Bakeyev about 1 year ago

  • Remove `cifs_default_permissions` field from the `sharing_cifs_share`,
    making corresponding GUI element a trigger that if set launches `winacl`

Ticket: #27881

Revision f6fc98b6 (diff)
Added by Timur I. Bakeyev about 1 year ago

  • Remove `cifs_default_permissions` field from the `sharing_cifs_share`,
    making corresponding GUI element a trigger that if set launches `winacl`

Ticket: #27881

Revision 78cda93c
Added by Timur Bakeyev about 1 year ago

Merge pull request #1111 from freenas/FIX-27881-master

  • Remove cifs_default_permissions field from the sharing_cifs_share, making corresponding GUI element a trigger that if set launches winacl

Ticket: #27881

History

#1 Updated by Erin Clark over 1 year ago

  • Related to Feature #26964: "Apply default permissions" in SMB share config is confusing added

#2 Updated by Timur Bakeyev over 1 year ago

  • Status changed from Unscreened to Screened

This field should be removed from the config DB at all, IMHO. It's a trigger, that should initialize the reset sequence.

But it's in Django, which complicates things.

#3 Updated by Dru Lavigne about 1 year ago

  • Status changed from Screened to Not Started

#4 Updated by Dru Lavigne about 1 year ago

  • Project changed from TrueNAS to FreeNAS
  • Category changed from Middleware to Middleware
  • Migration Needed deleted (No)
  • Hide from ChangeLog deleted (No)
  • Support Department Priority deleted (0)

#5 Updated by William Grzybowski about 1 year ago

  • Category changed from Middleware to OS

#6 Updated by Timur Bakeyev about 1 year ago

  • Status changed from Not Started to In Progress

#7 Updated by John Hixson about 1 year ago

Timur Bakeyev wrote:

https://github.com/freenas/freenas/pull/1108 for the master

I have some issues with this ticket. We need to do 2 things here:

1. On new shares, we need to set the permissions the way they currently get set (which this button does).
2. Many users need the ability the reset permissions at all.

I don't have a problem with removing the button, but we need (1) to happen when a new share is created without users having to do any extra work. (2) should be available in this dialog somewhere, but I leave that to the UI experts.

#8 Updated by Timur Bakeyev about 1 year ago

If I understand you correctly (2) comes out of the box with this PR. Whenever you check Default permissions they'll be reset with winacl.

The (1) I missed. Well, original ticket also :) So, I guess, we need to distinct create and edit share actions and for the first one automatically pre-check the Default permissions checkbox.

Does this sound right?

#9 Updated by Timur Bakeyev about 1 year ago

To clarify, I didn't remove the button, I moved it from the models into forms, so it's not persistent anymore. Checking it would initiate reset permissions action, but that won't be kept in the config DB - it's an immediate action.

#10 Updated by John Hixson about 1 year ago

Timur Bakeyev wrote:

To clarify, I didn't remove the button, I moved it from the models into forms, so it's not persistent anymore. Checking it would initiate reset permissions action, but that won't be kept in the config DB - it's an immediate action.

I apologize for the misinterpretation. Andrew & myself figured out what was going on here after a lengthy discussion ;-) So it sounds like everything is working as it should, provided (1) and (2) are met.

#11 Updated by Timur Bakeyev about 1 year ago

John, you was right, (1) wasn't there, so I've created another PR for master:

https://github.com/freenas/freenas/pull/1117

Please, review it.

#12 Updated by Timur Bakeyev about 1 year ago

  • Status changed from In Progress to Ready for Testing

#13 Updated by Dru Lavigne about 1 year ago

  • Subject changed from Set smb default permissions to false in the db to Remove "Apply Default Permissions" checkbox from Sharing -> SMB
  • Needs Merging changed from Yes to No

#14 Updated by Bonnie Follweiler 12 months ago

17211
17214

I created a brand new VM using the latest FreeNAS Nightlies (FreeNAS-11.2-MASTER-201805040904)
In the old UI:
If you create an SMB share in the Wizard the Default Permissions is unchecked
If you go to Sharing -> Windows (SMB) -> Add Windows (SMB) Share the Default Permissions box is checked
(screenshots provided)

In the new UI it is unchecked by default

#15 Updated by Bonnie Follweiler 12 months ago

After a conversation with Timur i have learned that, the Wizard in the old UI is not handling the "Default Permissions" correctly. Also the new GUI is not correct when creating an SMB share. I will create a ticket for the new GUI and assign it to Erin

#16 Updated by Bonnie Follweiler 12 months ago

  • Related to Bug #33084: The "Default Permissions" box is not checked when a new SMB share is created added

#17 Updated by Dru Lavigne 12 months ago

  • Subject changed from Remove "Apply Default Permissions" checkbox from Sharing -> SMB to Set the default setting for the SMB -> Sharing -> SMB -> Apply Default Permissions checkbox to checked
  • Needs Doc changed from Yes to No

#18 Updated by Bonnie Follweiler 11 months ago

After talking to Timur. The test was if the "Apply Default Permissions" was checked after an SMB share was created using the Wizard.
Test Passed in TrueNAS-11.1-U5-RC6 and in FreeNAS-11.1-U5

#19 Updated by Bonnie Follweiler 11 months ago

  • Status changed from Failed Testing to Passed Testing
  • Needs QA changed from Yes to No

#20 Updated by Dru Lavigne 11 months ago

  • Status changed from Passed Testing to Done

#21 Updated by Dru Lavigne 8 months ago

  • Related to Bug #41784: Default permissions button gets unticked added

Also available in: Atom PDF