Article Number: 000126621
Possible errors observed as a result of these measures:
rbash: cd: restricted
(when trying to navigate through the directories)rbash: xxxx: restricted: cannot redirect output
(when trying to redirect outputs to a file with ">")rbash: xxxx: command not found
(when trying to run commands not in the approved allow list)rbash: ./example_script: restricted: cannot specify `/' in command names
(when trying to run scripts)rbash implementation means is that the shell behavior is changed by disabling some actions and features, including:
See here for more details:
https://www.gnu.org/software/bash/manual/html_node/The-Restricted-Shell.html
A few alternatives are presented here to make navigation and interaction with the system easier despite the limitations that are described above.
File Transfers
If you want to download files directly from the directory they are on, you have to find the full path first from the PowerStore shell, then you can use tools such as pscp (from windows cli) or scp (from linux).
Windows pscp example:
Usage: pscp [options] [user@]host:source target pscp [options] source [source...] [user@]host:target |
pscp -scp -P 22 service@<appliance or node IP>:/path/to/file/to/download C:\Local\dowwnload-save\location pscp -scp service@xx.xx.xx.xx:/cyc_var/cyc_service/data_collection/xxxxxxxx/powerstore_xxxxxxxx_2020-05-06_00-00-00_service-data.tgz C:\LOGS service@xx.xx.xx.xx's password: powerstore_xxxxxxxxx | 10944 kB | x.x kB/s | ETA: 00:00:00 | 100% |
pscp -scp -P 22 C:\Logs\somefile.txt service@xx.xx.xx.xx:/home/service/user service@xx.xx.xx.xx's password: somefile.txt | 211 kB | 212.0 kB/s | ETA: 00:00:00 | 100% |
Navigation
[SVC:service@xxxxxxx-B user]$ ls -l /cyc_var/cyc_service/data_collection/ total 80 drwxrwsr-x+ 2 cyc cycg 4096 Apr 8 14:48 0941c91a-431d-4bfb-b5b2-062b02c45950 drwxrwsr-x+ 2 cyc cycg 4096 Apr 25 15:27 20439835-3654-4d93-af3b-ebfc0ae222fd drwxrwsr-x+ 2 cyc cycg 4096 Apr 19 15:27 3d2011a8-0aa2-48d7-9f3f-1f234df2abfb drwxrwsr-x+ 2 cyc cycg 4096 Apr 19 13:08 473ed1cb-0ebb-4bd6-bbf6-e87e61af8578 drwxrwsr-x+ 2 cyc cycg 4096 Apr 22 14:01 48a522ff-0aaa-4f83-a936-973f6f1097b2 drwxrwsr-x+ 2 cyc cycg 4096 Apr 22 15:26 4ba1375c-c23b-47c6-bc04-1498e3443b39 drwxrwsr-x+ 2 cyc cycg 4096 Apr 27 15:26 6faf6d88-58c6-4891-b001-8e0311e9e00d drwxrwsr-x+ 2 cyc cycg 4096 Apr 24 14:36 798b13df-70bb-4fd3-9691-608b735207e9 drwxrwsr-x+ 2 cyc cycg 4096 Apr 28 15:27 8187fc5d-d389-4676-a69f-23db20c06602 drwxrwsr-x+ 2 cyc cycg 4096 Apr 26 15:12 83cb57dc-dee3-4dae-8585-e3b670d4b52a drwxrwsr-x+ 2 cyc cycg 4096 Apr 18 12:50 a038d9ac-6ecc-4c49-8bb3-ae6623b418f6 drwxrwsr-x+ 2 cyc cycg 4096 Apr 21 13:43 b02e88fb-3f80-47a3-8f6d-3547afad7c35 drwxrwsr-x+ 2 cyc cycg 4096 Apr 24 15:26 b4bdd7c3-dbd0-4ac7-93ac-2e3e7ea1ff93 drwxrwsr-x+ 2 cyc cycg 4096 Apr 23 14:18 bf965b7e-e136-42ba-b46c-5fc565b6cf58 drwxrwsr-x+ 2 cyc cycg 4096 Apr 20 13:26 d96caca8-4395-4f15-aea1-60dd7a2490f5 drwxrwsr-x+ 2 cyc cycg 4096 Apr 23 15:26 e101bd57-fd3d-421a-b15a-341456a52f1f drwxrwsr-x+ 2 cyc cycg 4096 Apr 25 14:54 e57e625d-e393-4919-b0d1-5efd89042897 drwxrwsr-x+ 2 cyc cycg 4096 Apr 20 15:26 ea40f70d-3cbf-4c84-9643-627fdbf9f0bd drwxrwsr-x+ 2 cyc cycg 4096 Apr 21 15:26 ea9d95dd-1c72-4b2b-929a-ab6ec9cbedc1 drwxrwsr-x+ 2 cyc cycg 4096 Apr 17 12:34 fa02405b-ae24-4d7d-b178-97a99a2b717f [SVC:service@xxxxxxx-B user]$ |
PowerStore, PowerStore 1000X, PowerStore 1000T, PowerStore Expansion Enclosure, PowerStore 3000X, PowerStore 3000T, PowerStore Rack, PowerStore 5000X, PowerStore 5000T, PowerStore 7000X, PowerStore 7000T, PowerStore 9000X, PowerStore 9000T
27 Apr 2021
8
Solution