SSH logon into FreeNas 9.1.1

Status
Not open for further replies.

Freesnofla

Patron
Joined
Oct 27, 2013
Messages
216
Hi, I really need your support I can't enter FreeNas via SSH, I activated the Service in the FreeNas Menu but when I try to login with root user I get access denied. I'm inside my own network so far and not longer sure why I#m not able to get there by ssh. Do I have to forwad port 22 in the router?

regards
freenassnofla
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
port forwarding is only necessary when trying to access something from OUTSIDE the network.

did you enable 'login as root with password', in the SSH config?
 

Freesnofla

Patron
Joined
Oct 27, 2013
Messages
216
No I did not, but after changing I'm inside the FreeNas.

But know the most important point comes up, I need to change the upload limit in the owncloud plugin.
I guess that I have to cd..., but where exactly d I go? Any idea on that one I'm really not a star on that task. Maybe somebody can guide me as I'm nervous to destroy the system.
 

Freesnofla

Patron
Joined
Oct 27, 2013
Messages
216
Yes I did but it makes me crazy, as I can't find that folders. Havent any idea how I can come to that settings.

Code:
CJ,
Did you use the plugin? What settings have you used? I guess you would have had to change the settings to make changes. I am using the following settings in the .htaccess file:
Code (text):
 
    > php_value upload_max_filesize 12G
    php_value post_max_size 12G
    php_value memory_limit 1024M
    php_value output_buffering 12288
 
And the following in the php.ini file:
Code (text):
 
    output_buffering = 12288
    max_execution_time = 300
    max_input_time = 300
    memory_limit = 1024M
    post_max_size = 12G
    upload_tmp_dir = "/media/tmpup"
    upload_max_filesize = 12G
    default_socket_timeout = 300
 
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Yes I did but it makes me crazy, as I can't find that folders. Havent any idea how I can come to that settings.

Code:
CJ,
Did you use the plugin? What settings have you used? I guess you would have had to change the settings to make changes. I am using the following settings in the .htaccess file:
Code (text):
 
    > php_value upload_max_filesize 12G
    php_value post_max_size 12G
    php_value memory_limit 1024M
    php_value output_buffering 12288
 
And the following in the php.ini file:
Code (text):
 
    output_buffering = 12288
    max_execution_time = 300
    max_input_time = 300
    memory_limit = 1024M
    post_max_size = 12G
    upload_tmp_dir = "/media/tmpup"
    upload_max_filesize = 12G
    default_socket_timeout = 300
 
Read the documentation on jails. You have to jexec into the jail. Think of a jail as being a VM

Sent from my Nexus 5
 

Freesnofla

Patron
Joined
Oct 27, 2013
Messages
216
Thanks man, let me see if I can find out to get into the jail I will read tomorrow evening and see if I can follow that procedure.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Read the documentation on jails. You have to jexec into the jail. Think of a jail as being a VM
You actually don't need to use jexec. You can modify the files directly from FreeNAS. You only need to jexec into the jail when you want to manipulate the processes (start/kill). To change files you can go directly to <jail_root>/<jail_name> and do your edits.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
You actually don't need to use jexec. You can modify the files directly from FreeNAS. You only need to jexec into the jail when you want to manipulate the processes (start/kill). To change files you can go directly to <jail_root>/<jail_name> and do your edits.
Sorry. I don't use jails so I just know what I have seen in the forums mentioned when discussing them. I assumed wrongly. Thanks for the info.

Sent from my Nexus 5
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Sorry. I don't use jails so I just know what I have seen in the forums mentioned when discussing them. I assumed wrongly. Thanks for the info.
Your suggestion was also fine. jexecing doesn't hurt, I just wanted to point out it is not absolutely necessary. The jail's "root" filesystem is a plain, nothing special, ZFS dataset and therefore can be also accessed directly.
 

Freesnofla

Patron
Joined
Oct 27, 2013
Messages
216
Sorry, but I tried already a couple of times and are now inside the root@freenas. That worked fine for me, next I tried to come to the jail, but how do I get there? cd /jail/owncloud brings only a error message. What have I to do there I really can#t get there. Well I found the first key it's JLS where I found the jail path "/mnt/RAID1/jails/owncloud_1".

But where do I see the files where I have to modify the upload volume?
 

Freesnofla

Patron
Joined
Oct 27, 2013
Messages
216
Is there anybody who can help me out? I'm not sure what to do now.

Code:
  JID  IP Address      Hostname                      Path
    1  -              owncloud_1                    /mnt/RAID1/jails/owncloud_1
    2  -              plex_2                        /mnt/RAID1/jails/plex_2
[root@freenas] ~# cd /mnt/RAID1/jails/owncloud_1
[root@freenas] /mnt/RAID1/jails/owncloud_1# cd .htaccess
.htaccess: No such file or directory.
[root@freenas] /mnt/RAID1/jails/owncloud_1# -ls
-ls: Command not found.
[root@freenas] /mnt/RAID1/jails/owncloud_1# ls
+COMPACT_MANIFEST* .profile*          dev/              media/            sbin/
./                .rnd*              etc/              mnt/              sys@
../                COPYRIGHT*        home@              proc/              tmp/
.cshrc*            bin/              lib/              rescue/            usr/
.plugins/          boot/              libexec/          root/              var/
[root@freenas] /mnt/RAID1/jails/owncloud_1# cd /.htaccess
/.htaccess: No such file or directory.
[root@freenas] /mnt/RAID1/jails/owncloud_1# cat .htaccess
cat: .htaccess: No such file or directory
[root@freenas] /mnt/RAID1/jails/owncloud_1# find .htaccess
find: .htaccess: No such file or directory
[root@freenas] /mnt/RAID1/jails/owncloud_1# /usr/libexec/locate.updatedb
>>> WARNING
>>> Executing updatedb as root.  This WILL reveal all filenames
>>> on your machine to all login users, which is a security risk.
[root@freenas] /mnt/RAID1/jails/owncloud_1# locate php.ini
/mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-development
/mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-production
[root@freenas] /mnt/RAID1/jails/owncloud_1# cd /usr/pbi/owncloud-amd64/www/owncloud/lib/files/storage
/usr/pbi/owncloud-amd64/www/owncloud/lib/files/storage: No such file or directory.
[root@freenas] /mnt/RAID1/jails/owncloud_1#
[root@freenas] /mnt/RAID1/jails/owncloud_1# /usr/pbi/owncloud-amd64/www/owncloud/lib/files/storage
/usr/pbi/owncloud-amd64/www/owncloud/lib/files/storage: Command not found.
[root@freenas] /mnt/RAID1/jails/owncloud_1# locate php.ini
/mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-development
/mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-production
[root@freenas] /mnt/RAID1/jails/owncloud_1#
[root@freenas] /mnt/RAID1/jails/owncloud_1#


And from here I don't have a clue how to come inside there and change the files.
 

Freesnofla

Patron
Joined
Oct 27, 2013
Messages
216
Still not succeeded isn't there anybody who can help me out?

Code:
[root@freenas] ~# jls
  JID  IP Address      Hostname                      Path
    1  -              owncloud_1                    /mnt/RAID1/jails/owncloud_1
    2  -              plex_2                        /mnt/RAID1/jails/plex_2
[root@freenas] ~# cd 1
1: No such file or directory.
[root@freenas] ~# cd /owncloud_1
/owncloud_1: No such file or directory.
[root@freenas] ~#
[root@freenas] ~# /mnt/RAID1/jails/owncloud_1
/mnt/RAID1/jails/owncloud_1: Permission denied.
[root@freenas] ~# cd /mnt/RAID1/jails/owncloud_1
[root@freenas] /mnt/RAID1/jails/owncloud_1# ls
+COMPACT_MANIFEST* COPYRIGHT*        libexec/          sys@
./                bin/              media/            tmp/
../                boot/              mnt/              usr/
.cshrc*            dev/              proc/              var/
.plugins/          etc/              rescue/
.profile*          home@              root/
.rnd*              lib/              sbin/
[root@freenas] /mnt/RAID1/jails/owncloud_1# cd .plugins
[root@freenas] /mnt/RAID1/jails/owncloud_1/.plugins# ls
./                        owncloud-5.0.12-amd64.pbi*
../
[root@freenas] /mnt/RAID1/jails/owncloud_1/.plugins# ls -la
total 56146
drwxrwxrwx  2 root  wheel        3 Nov 16 18:41 ./
drwxrwxrwx  18 root  wheel        25 Nov 16 18:41 ../
-rwxrwxrwx  1 root  wheel  57385429 Nov 16 18:41 owncloud-5.0.12-amd64.pbi*
[root@freenas] /mnt/RAID1/jails/owncloud_1/.plugins# cd owncloud-5.0.12-amd.pbi
owncloud-5.0.12-amd.pbi: No such file or directory.
[root@freenas] /mnt/RAID1/jails/owncloud_1/.plugins# cd owncloud-5.0.12-amd.pbi*
owncloud-5.0.12-amd.pbi*: No match.
[root@freenas] /mnt/RAID1/jails/owncloud_1/.plugins#


I need to go for .htaccess, but where do I find that file?
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
In your case the .htaccess file is here: /mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/www/owncloud/.htaccess
The php.ini you are looking for is probably this one: /mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-production
Run nano <file> to edit the files (i.e. nano /mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/www/owncloud/.htaccess). Hit Ctrl+X to exit the editor.
 

Freesnofla

Patron
Joined
Oct 27, 2013
Messages
216
It seems that I do have a problem when I enter the path I get the following answer from the shell:

Code:
Welcome to FreeNAS
[root@freenas] ~# cd /mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/www/owncloud/.htaccess
/mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/www/owncloud/.htaccess: Not a directory.
[root@freenas] ~# /mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-production
/mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-production: 
	
	


PHP:
: not found
/mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-production: 3: Syntax error: ";;" unexpected
[root@freenas] ~#
[/CODE]
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
It seems that I do have a problem when I enter the path I get the following answer from the shell:

Code:
Welcome to FreeNAS
[root@freenas] ~# cd /mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/www/owncloud/.htaccess
/mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/www/owncloud/.htaccess: Not a directory.
[root@freenas] ~# /mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-production
/mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-production: 
	
	


PHP:
: not found
/mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-production: 3: Syntax error: ";;" unexpected
[root@freenas] ~#
[/CODE][/quote]
You should not [I]cd[/I] (change directory) into a file. That makes no sense. Use [I]nano[/I] to edit the files (as I already told you in my post above):
[I]nano /mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/www/owncloud/.htaccess[/I]
[I]nano /mnt/RAID1/jails/owncloud_1/usr/pbi/owncloud-amd64/etc/php.ini-production[/I]
 

Freesnofla

Patron
Joined
Oct 27, 2013
Messages
216
Hi Dusan, you made my day I wasn't aware that I directly could use nano without cd; finally I fixed it and I leraned bit more how running shell.
Thanks a lot for support.

best regards
freenassnofla
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Please make a new thread with your new unrelated question. Thanks.

Sent from my DROID BIONIC using Tapatalk
 
Status
Not open for further replies.
Top