CageFS command not working for user
I have flvtool2 installed on the server. Path to binary file location was added in file /etc/cagefs/conf.d/vshare.cfg
1 2 3 4 5 |
[root@server22 ~]# cat /etc/cagefs/conf.d/vshare.cfg [vshare] comment=vShare Youtube Clone Requirements paths=/usr/bin/ffmpeg, /usr/bin/mencoder, /usr/bin/mplayer, /usr/bin/flvtool2, /usr/bin/lame, /usr/bin/yamdi, /usr/bin/qt-faststart, /usr/bin/MP4Box, /usr/bin/mediainfo, /usr/bin/neroAacEnc [root@server22 ~]# |
The binary program works properly when running as root, but it fail when switching to a user that use CageFS.
1 2 3 4 5 6 7 8 |
[root@server22 ~]# /usr/bin/flvtool2 -V FLVTool2 1.0.6 [root@server22 ~]# su - socialwe Last login: Thu May 28 06:33:33 UTC 2020 on pts/0 [socialwe@server22 ~]$ /usr/bin/flvtool2 -V <internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError) from <internal:gem_prelude>:1:in `<compiled>' [socialwe@server22 ~]$ |
The problem is fixed by editing file /etc/cagefs/cagefs.mp
1 |
vi /etc/cagefs/cagefs.mp |
Add following lines
1 2 3 4 |
!/usr/lib64/ruby/ !/usr/share/rubygems/ !/usr/share/ruby/ !/usr/local/share/ruby/ |
Now remount cagefs with
1 |
cagefsctl --remount-all |
See cagefs