Project

General

Profile

Bug #19397

Rename TFTP umask field to "File Permissions" and use permissions selection grid

Added by steve ling over 2 years ago. Updated 10 months ago.

Status:
Done
Priority:
Nice to have
Assignee:
Vladimir Vinogradenko
Category:
Middleware
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

Description

While configuring TFTP so I could upload a firmware update to my router I noticed if the umask value in the TFTP service configuration starts with a zero then the umask value is interpreted as hex, else the umask value is interpreted as decimal.

Build FreeNAS-9.10.1-U4 (ec9a7d3)

Steps to reproduce:
1 - In the GUI go to Services and open the TFTP configuration dialog
2 - Set the umask to 117 (expect this to enable u=rw, g=rw in files that are received via TFTP)
3 - I pointed the TFPT directory to a new dataset I created for TFTP root.
4 - The underlying dataset directory has owner as user "tftp" with permissions rwx and group "wheel" rwx
5 - I allowed TFTP to create new files
6 - I set the TFTP user to "tftp"
7 - Enabled TFTP
8 - I wrote a file to the TFTP server

Results:
When files are received they have permissions: u=rw and o=w, not the expected permissions u=rw, g=rw

[steve@FreeNAS] ~% ls al /mnt/TftpRoot
drwxrwxrwx 2 tftp wheel 5 Dec 3 19:27 ./
drwxr-xr-x 10 root wheel 10 Dec 3 14:24 ../
-rw-----w
1 tftp wheel 6 Dec 3 17:22 file.txt

If I interpret the umask value as decimal 117 (hex 0x75) then these permissions make sense because g=rwx and o=rx were masked.

If I add a leading zero to the umask value (0117) then the umask is interpreted as hex and the permissions on received files are as expected

[steve@FreeNAS] ~% ls al /mnt/TftpRoot
drwxrwxrwx 2 tftp wheel 5 Dec 3 19:27 ./
drwxr-xr-x 10 root wheel 10 Dec 3 14:24 ../
-rw-rw---
1 tftp wheel 6 Dec 3 19:27 file.txt

(BTW, I later realized that 0113 is a better umask value for TFTP so the router can read back files it writes via TFTP, but leaving above as 0117 to demonstrate the bug)

Associated revisions

Revision 9031f1f6 (diff)
Added by Vladimir Vinogradenko over 1 year ago

fix(gui): Use permissions widget (as in FTP settings) for TFTP instead of text field

Ticket: #19397

Revision 54e5499a (diff)
Added by Vladimir Vinogradenko about 1 year ago

fix(gui): Use permissions widget (as in FTP settings) for TFTP instead of text field

Ticket: #19397
(cherry picked from commit 9031f1f6398fada7b172e19b05b7807ef660daf0)

Revision f5b2056a (diff)
Added by Dru Lavigne 12 months ago

Doc TFTP field rename.
Ticket: #19397

Revision 1305e08b (diff)
Added by Dru Lavigne 12 months ago

Doc TFTP field rename.
Ticket: #19397

Revision 4289fb1e (diff)
Added by Dru Lavigne 10 months ago

Update legacy FreeNAS and TrueNAS screenshots for TFTP.
Ticket: #19397

History

#1 Updated by Bonnie Follweiler over 2 years ago

  • Assignee set to Josh Paetzel

#2 Updated by Josh Paetzel over 2 years ago

  • Status changed from Unscreened to Screened
  • Priority changed from No priority to Nice to have
  • Target version set to 9.10.2-U1

#3 Avatar?id=14398&size=24x24 Updated by Kris Moore over 2 years ago

  • Target version changed from 9.10.2-U1 to 9.10.2-U2

#4 Updated by Josh Paetzel over 2 years ago

  • Status changed from Screened to Unscreened
  • Assignee changed from Josh Paetzel to Kris Moore

#5 Avatar?id=14398&size=24x24 Updated by Kris Moore over 2 years ago

  • Assignee changed from Kris Moore to Suraj Ravichandran

#6 Updated by Suraj Ravichandran over 2 years ago

  • Assignee changed from Suraj Ravichandran to Erin Clark

I think erin knows this tftp stuff and will be able to fix it faster than me.

@Erin please hand it back to me if I am incorrect above my above assumption and you do not feel comfortable with this.

#7 Avatar?id=14398&size=24x24 Updated by Kris Moore about 2 years ago

Erin: Please screen your bug!

#8 Updated by Erin Clark about 2 years ago

  • Status changed from Unscreened to Screened

#9 Avatar?id=14398&size=24x24 Updated by Kris Moore about 2 years ago

  • Assignee changed from Erin Clark to Suraj Ravichandran

#10 Avatar?id=14398&size=24x24 Updated by Kris Moore about 2 years ago

  • Target version changed from 9.10.2-U2 to 9.10.3

#11 Avatar?id=14398&size=24x24 Updated by Kris Moore about 2 years ago

  • Target version changed from 9.10.3 to 9.10.4

#12 Avatar?id=14398&size=24x24 Updated by Kris Moore about 2 years ago

  • Target version changed from 9.10.4 to 11.1

#13 Updated by Dru Lavigne over 1 year ago

  • Assignee changed from Suraj Ravichandran to William Grzybowski

William: please load balance between Vladimir and Nikola.

#14 Updated by William Grzybowski over 1 year ago

  • Status changed from Screened to Unscreened
  • Assignee changed from William Grzybowski to Nikola Gigic

Another one for you, Nikola.

Thanks

#15 Updated by Nikola Gigic over 1 year ago

  • Status changed from Unscreened to Screened

#16 Avatar?id=14398&size=24x24 Updated by Kris Moore over 1 year ago

  • Target version changed from 11.1 to 11.1-U1

#17 Updated by Dru Lavigne over 1 year ago

  • Assignee changed from Nikola Gigic to Vladimir Vinogradenko

#18 Updated by Vladimir Vinogradenko over 1 year ago

  • Status changed from Screened to 15
  • Assignee changed from Vladimir Vinogradenko to William Grzybowski

Can we use permissions widget (as in FTP settings) for TFTP instead of text field?

#19 Updated by William Grzybowski over 1 year ago

  • Assignee changed from William Grzybowski to Vladimir Vinogradenko

We could. I am afraid people might then confuse umask with normal permissions. If you dont think thats an issue, go ahead.

#20 Updated by Vladimir Vinogradenko over 1 year ago

  • Assignee changed from Vladimir Vinogradenko to William Grzybowski

For FTP umasks we already use this widget and convert permissions to umasks in legacy GUI code.

#21 Updated by William Grzybowski over 1 year ago

  • Assignee changed from William Grzybowski to Vladimir Vinogradenko

So are you talking about changing the field name from umask to something else in the UI and do the gymnastics in the backend? Sure.

#22 Updated by Vladimir Vinogradenko over 1 year ago

  • Status changed from 15 to Needs Developer Review
  • Assignee changed from Vladimir Vinogradenko to William Grzybowski

#23 Updated by William Grzybowski over 1 year ago

  • Status changed from Needs Developer Review to Reviewed by Developer
  • Assignee changed from William Grzybowski to Vladimir Vinogradenko
  • Target version changed from 11.1-U1 to 11.2-BETA1

#24 Updated by Vladimir Vinogradenko over 1 year ago

  • Status changed from Reviewed by Developer to Ready For Release

#25 Updated by Dru Lavigne about 1 year ago

  • Subject changed from TFTP umask requires leading zero to Use permissions widget for TFTP umask and permissions fields
  • Status changed from Ready For Release to Done

#26 Updated by Dru Lavigne about 1 year ago

  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#27 Updated by Dru Lavigne about 1 year ago

  • Subject changed from Use permissions widget for TFTP umask and permissions fields to Rename TFTP umask field to "File Permission" and use permissions selection grid
  • Needs Doc changed from No to Yes

#28 Updated by Dru Lavigne 12 months ago

  • Subject changed from Rename TFTP umask field to "File Permission" and use permissions selection grid to Rename TFTP umask field to "File Permissions" and use permissions selection grid

#30 Updated by Dru Lavigne 12 months ago

  • Status changed from Done to Ready for Testing

#31 Updated by Bonnie Follweiler 10 months ago

  • Severity set to New

Zack Welch is working on this ticket
He is waiting for a related ticket to be fixed before he can test this. He needs to be able to set up tftp

#33 Avatar?id=55038&size=24x24 Updated by Zackary Welch 10 months ago

  • Needs QA changed from Yes to No

I tested TFTP between two FreeNAS and found the permissions were changed to the file permissions set in the services settings when sent. Seems this bug has been fixed.

#34 Avatar?id=55038&size=24x24 Updated by Zackary Welch 10 months ago

  • Status changed from Ready for Testing to Passed Testing

#35 Updated by Dru Lavigne 10 months ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF