No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Failed to Write NFS Shared Data Through FTP Access After the Data Is Migrated

Publication Date:  2019-04-10 Views:  31 Downloads:  0
Issue Description

1. In the same file system of the existing EMC storage, the customer creates an NFS share, mounts the share to the front-end Red Hat host, and creates an FTP share whose read and write permissions are granted to FTP users. Then, the customer uses a Windows host to access the FTP share as user wcmweb.

2. The customer performs the same operations on OceanStor 6800 V3, uses the same front-end Linux host, and creates local FTP authentication account wcmweb on OceanStor 6800 V3 for FTP access.

3. The customer mounts the two NFS shares to the same Linux host, and then runs the following commands to synchronize data from the EMC storage to OceanStor 6800 V3:

4. After data is synchronized, the customer uses a Windows host to access the FTP shares on OceanStor 6800 V3 as user wcmweb. The wcmweb account has the write permission of directories and files whose permission is 777, but cannot write those whose permission is 755.

5. The wcmweb account can write directories and files whose permissions are 777 and 755 on the EMC storage.

Handling Process

1. Upload a file to or create a directory on OceanStor 6800 V3 by using FTP. The operation is successful. It proves that the issue is not a storage problem.

2. For a file or directory whose permission is 755, only its owner has the write permission. If a user uses the rsync commands containing the -o parameter to migrate data, the owner properties are also migrated. In such cases, when the user ID of the wcmweb account on OceanStor 6800 V3 is different from the owner ID of the file or directory on the EMC storage, the wcmweb account does not have the write permission of the file or directory.

3. Check the owner IDs of files and directories on the customer EMC storage. All owner IDs are 10001.



4. The user ID of the wcmweb account on OceanStor 6800 V3 is 100025, which is different from owner ID 10001 of files and directories on the EMC storage.


Root Cause

1. User IDs are authenticated in FTP authentication. Though the FTP username in this case remains the same before and after data migration, the UID changes and the user is identified as another one after the data migration.

2. If the permission of a file is 755, the file owner has read, write, and execution permissions of this file, and the owning group and other users have read and execution permissions of it.

3. In this case, the file owner ID is 10001 and the UID of user wcmweb who accesses the files is 100025 and authenticated as another user. As a result, the user has no write permission of some files.

Solution

On OceanStor 6800 V3, run CLI commands to create a local authentication account and set its UID to 10001.

create resource_user general name=xxx primary_group_name=xxx user_id=10001

END