forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com> Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
8.1 KiB
8.1 KiB
What Should I Do If Error Message "Permission denied" Is Displayed When I Remotely Log In to a Linux ECS?
Symptom
When I attempted to remotely log in to a Linux ECS, the system displayed error "Permission denied".
Root Cause
The nofile parameter in /etc/security/limits.conf is used to set the maximum number of files that can be opened in the system. If the value is greater than the fs.nr_open value (1048576 by default) set in PermissionDenied.png, a login verification error will occur, leading to "Permission denied".
Solution
- Enter single-user mode.The following uses CentOS 7 as an example:
- Restart the ECS and click Remote Login.
- Click Ctrl+Alt+Del in the upper part of the remote login panel to restart the ECS.
- Press the up arrow key to prevent automatic system startup. When the kernels are displayed, press e to enter the editing mode.
- Locate the row containing linux16 and delete the parameters you do not require.
- Change ro to rw for mounting the root partition with read-write permissions.
- Add rd.break and press Ctrl+X.
- Run the following command to go to the /sysroot directory:
chroot /sysroot
- Run the following command to view the fs.nr_open value:
sysctl fs.nr_open
- Change the nofile value in /etc/security/limits.conf so that the value is smaller than the fs.nr_open value obtained in 2.
- Restart the ECS and try to log in to it again.
Parent topic: Remote Login Errors on Linux




