LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Making folders visible with SSH (https://www.linuxquestions.org/questions/linux-newbie-8/making-folders-visible-with-ssh-4175472669/)

hrohibil 08-08-2013 12:58 PM

Making folders visible with SSH
 
Hi

Please help me out here. After i create a folder with "mkdir foldername" and then want to make it visible from my web GUI, what permissions do i set it to?

the folder is created in /root/volume1/foldername

If i am inside volume1 directory, can i then write "chmod 777/foldername??

How can i see which permissions a folder has???

Please advice..

I am running the service on my NAS diskstation. I am using putty as a windows user.

Br HRB

As i am a newbee, a step by step would be much appreciated. I really want to learn this..

unSpawn 08-08-2013 04:05 PM

Quote:

Originally Posted by hrohibil (Post 5005726)
After i create a folder with "mkdir foldername" and then want to make it visible from my web GUI, what permissions do i set it to?
the folder is created in /root/volume1/foldername

Root is not a human user but a grab bag of privileges required for the system to work. So first of all you shouldn't create directories in the /root directory. Secondly "making directories visible from the web GUI" depends on if this "web GUI" allows additional directories to be configured via the web interface or if you need to configure the web server directly. Knowing the NAS brand and version, and knowing if there's say /etc/httpd/conf.d/ configuration files, could help.


Quote:

Originally Posted by hrohibil (Post 5005726)
If i am inside volume1 directory, can i then write "chmod 777/foldername??

Making the directory writable is a good way to avoid learning anything and a surefire way to fsck up a *NIX system. Just don't.

hrohibil 08-09-2013 11:15 AM

Ok. I am running ssh server side on my synology nas diskstation and ny client software is putty.
But in my root/volume1/ this is the directory where have most of my files?

Please explain how i can create a folder which can be seing when i enter my nas from the web GUI?

Also you mention sonething about user root? How can i create a admin user?

---------- Post added 08-09-13 at 11:15 AM ----------

Ok. I am running ssh server side on my synology nas diskstation and ny client software is putty.
But in my root/volume1/ this is the directory where have most of my files?

Please explain how i can create a folder which can be seing when i enter my nas from the web GUI?

Also you mention sonething about user root? How can i create a admin user?

Firerat 08-09-2013 11:36 AM

Are you looking for something like this?

How to create shared folders on Synology NAS

hrohibil 08-09-2013 12:02 PM

Ok. I logged into my nas Web GUI and under user priviliges, on my user name i am under a administrator group and the here under folder permission access, the folder which i created is visible, i just had to put a check in the box to enable my account to have access of the folder...

So how can make this folder visible to a sudden user when i create a folder in ssh??

Firerat 08-09-2013 12:26 PM

Quote:

Originally Posted by hrohibil (Post 5006374)

So how can make this folder visible to a sudden user when i create a folder in ssh??

change the owner/group of the directory

but first you may find it easier to create a few accounts/dir. via the GUI,
then have a look at the permissions it has assigned.

hrohibil 08-09-2013 01:28 PM

how come when i make a chown command on the folder and when entering my nas with the same admin account i added in the chown command for this specific folder, then it is still not visible to me??

Firerat 08-09-2013 02:05 PM

Quote:

Originally Posted by hrohibil (Post 5006430)
how come when i make a chown command on the folder and when entering my nas with the same admin account i added in the chown command for this specific folder, then it is still not visible to me??

Visible where? ( on the shell, web interface, network mount? )
and to who? ( as in user account, not you as in you )


You would also need to account for the parent directories, if the user/group does not have read for those they can't see the child directories regardless of their permissions.

And their may be other things at work in the NAS, not just filesystem permissions but some other database or whatever.

You have to fully understand how the 'native NAS management' 'works' before you can go bashing around via ssh

I'm not going to pretend I know how your NAS 'works', as I simply don't know.
but I'm fairly certain there will be some other 'layer' involved. ( I could be totally wrong )

To help you understand what is going on try this
login via ssh
Code:

touch ~/timestamp
then go into the GUI and change things, like add new user and give then access to the folder
back in your shell
Code:

find / -anewer ~/timestamp -type f
that will show you all files modified since you set the timestamp
from there you should have a better picture of what is going on


All times are GMT -5. The time now is 09:59 PM.