Azure Files NFS: changing owner/group fails with invalid argument

Nahush Bhanage 1 Reputation point
2020-12-20T10:06:36.217+00:00

Client info

CentOS Linux release 7.8.2003
Kernel 4.19.134-300.el7.x86_64
Azure Files share mounted over NFSv4.1
ID mapping disabled on client

Repro steps

1) Create a file named "file1". Works fine.
[root@af335-1]# > file1

2) Change owner/group of "file1". Works fine.
**[root@af335-1]# chown 0:0 file1 **

3) Try to create a file named "file1:" Fails with invalid argument as expect. (colon is not allowed in paths as documented in https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata, so this file creation fails as expected)
[root@af335-1]# > file1:
bash: file1:: Invalid argument

4) Change owner/group of "file1" (same command as #2). Fails with invalid argument.
[root@af335-1]# chown 0:0 file1
chown: changing ownership of ‘file1’: Invalid argument

Workaround

Need to unmount and remount the share to get chown working again. No issues if I skip step #3.

Troubleshooting

Tcpdump shows

49783-chown-pcap.png

49823-chwon-pcap-step2-setattr.png

49732-chwon-pcap-step4-setattr.png

Question: How does step #3 (attempting to create files with names containing unsupported characters) cause the NFS client to send alphanumeric UID/GID instead of numeric values?

Please let me know if you need more info from my end. Thank you.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,199 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sumarigo-MSFT 44,496 Reputation points Microsoft Employee
    2021-01-05T10:18:27.233+00:00

    @Nahush Bhanage Apologies for the delay! We found the root cause. You are getting this “:” (not supported ) in their file/dir name causing server to send BADNAME.

    Upon getting this exception, the client re-enables id-mapping. Can you disable id-mapping, but the bigger problem is even if a file/dir is even tried to be created with “:” name, the server sends BADNAME error. NFS client upon getting this BADNAME exception re-enables id-mapping, now the setting which was made to disable id-mapping is enabled/reset back.

    We are in the process of supporting the special characters and it will be available very soon I will keep you update once the special character is been fixed.

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.

    -----------------------------------------------------------------------------------------------------

    Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments