How to solve a problem of NFS 'permission denied'

Posted by Md. Mahidul Hasan on 12:22 AM with No comments


1. Created a new user at the QNAP server named 'username' and gave him full permission on the desired folder. For example, let's share the 'media' folder.

2. Mounted the partition from the client machine
[root@redhat ~]# mkdir /opt/mymedia/
[root@redhat ~]# mount -t cifs -o username=username,password=user's_password,uid=application_name,gid=application_name //192.168.1.1/media /opt/mymedia/

Testing:
[root@redhat ~]# cd /opt/mymedia/
[root@redhat mymedia]# ll
total 2
-rwxr-xr-x 0 nginx nginx  7 2020-12-15 12:44 100.txt
-rwxr-xr-x 0 nginx nginx  6 2020-12-15 12:44 200.txt
-rwxr-xr-x 0 nginx nginx 15 2020-12-15 12:45 adib.txt
-rwxr-xr-x 0 nginx nginx  5 2021-07-09 12:28 file_permisssion_testing
drwxr-xr-x 0 nginx nginx  0 2021-07-08 18:52 notification_request
drwxr-xr-x 0 nginx nginx  0 2021-06-13 15:10 @Recycle
drwxr-xr-x 0 nginx nginx  0 2021-01-09 18:26 uploads

The problem should be solved now!!! enjoy!!!