Uploading a Large File
Uploading Files to the Server
The following uses /opt as an example tool installation directory. Replace it with the actual directory.
- Obtain the file to be uploaded.
- Save the file to be uploaded in a subdirectory of the created user's directory. (Table 1 lists the possible directories.) The following describes how to use the devadmin user to upload the source file.
- Use an SFTP tool (for example WinSCP) to log in to the server OS as the root user.
- Copy the source file to be scanned to the /opt/DevKit/workspace/devadmin/porting/sourcecode/ directory.
Table 1 Directories to which files are manually uploaded Feature
Directory
Software porting assessment
/opt/DevKit/workspace/devadmin/porting/package/
Source code porting
/opt/DevKit/workspace/devadmin/porting/sourcecode/
Software package rebuild
/opt/DevKit/workspace/devadmin/porting/packagerebuild/
If a feature directory does not exist, manually create it. For example, upload source code porting files as devadmin:
1 2 3
mkdir -p /opt/DevKit/workspace/devadmin/porting/sourcecode/ chown -R devkit:devkit /opt/DevKit/workspace/devadmin/porting/ chmod -R 700 /opt/DevKit/workspace/devadmin/porting/
/opt is the default installation directory. Replace it with the actual one.
- Switch to the directory where the file is located.
1cd /opt/DevKit/workspace/devadmin/porting/sourcecode/
- Decompress the file, for example, a tar.gz file. If the file does not need to be decompressed, skip this step.
1tar -zxvf xxx.tar.gz
- Change the file owner group and permission (xxx indicates the decompressed folder or the folder uploaded by the user).
chown -R devkit:devkit xxx find xxx -type d -exec chmod 700 {} \; find xxx -type f -exec chmod 600 {} \;
If you do not run the chown -R devkit:devkit xxx command, run the following chmod command:
1chmod -R o+rw xxx
Parent topic: Common Operations