Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

changing folder permissons for Apache

  • 05-08-2006 10:14pm
    #1
    Registered Users, Registered Users 2 Posts: 3,514 ✭✭✭


    Hi guys, i have ssh'd into my server and i want to have access to view/edit my conf folder and it's entire contents via ftp. The end result i want to acheive is to be able to download files from with the said folders and edit them and then upload them once more all via ftp.

    I attempt to run "chmod 777 etc/httpd/conf" while logged in as root but i get an error stating that the operation is not permitted.

    What command should i be running?


Comments

  • Registered Users, Registered Users 2 Posts: 4,864 ✭✭✭MunsterCycling


    Why are you giving everyone RWX permission? Would 775 not be more appropriate, I assume your user acc is a member of root group here.

    MC


  • Registered Users, Registered Users 2 Posts: 3,514 ✭✭✭Rollo Tamasi


    As long as i can access the folder via ftp....
    do you know how to do it?


  • Registered Users, Registered Users 2 Posts: 4,864 ✭✭✭MunsterCycling


    /Scratches head...

    Umm not really no, think you'll have to wait around for a Nix Head to show up.


    MC


  • Registered Users, Registered Users 2 Posts: 354 ✭✭AndrewMc


    Hi guys, i have ssh'd into my server and i want to have access to view/edit my conf folder and it's entire contents via ftp.

    Please don't! Plain old FTP uses clear-text passwords, and so is not secure. What should do the job just as well instead is sftp, which is an FTP-like session that uses SSH. For intermittent use, scp is also quite handy (for example "scp httpd.conf myusername@server:/etc/apache/" or whatever). If you're able to use public-key authentication with the ssh on the server, you can get away with much less password typing, too.

    For copying over large collections of files, like your entire webtree, you might find rsync even better. It, too, can be passed through ssh (with the "-e ssh" switch). Rsync figures out which files have changed and copies them over, recursively handling subdirectories if you want.


  • Registered Users, Registered Users 2 Posts: 4,864 ✭✭✭MunsterCycling


    Knew one would show up eventually...
    ;)


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,865 ✭✭✭Syth


    If you're using Linux or FreeBSD you can use Fuse and sshfs to mount you remote files over ssh as a local directory. It's more convienient than FTP or SCP or SFTP IMO because the files are there like normal files in the system, and it's got full ssh protection.

    By default with sshfs and fuse you can't really do things as root on the local computer to the remote machine, but that can be changed by specifiying the allow_root option. If you use SSHfs/fuse you can just edit the files on you're local machine and the remote files will change.

    However you'll have to restart Apache on the remote machine (or reload it) to see the changes in the config file take effect. So you'll have to be logged into the remote machine anyway. I recommend ssh-ing into the remote machine as a normla user (not as root) and then su-ing to root.


  • Registered Users, Registered Users 2 Posts: 3,514 ✭✭✭Rollo Tamasi


    the information here is all good but i still don't know how to give myself persmisson to view/edit files via ftp to the folder in question...


  • Registered Users, Registered Users 2 Posts: 1,071 ✭✭✭Art_Wolf


    Chmod 755 the directories and chmod 644 the actual files within the directories.

    I use WinSCP and you should then be able to connect, browse to the conf directory and download the files.

    Note that if you work with the files on windows and then upload them to the linux server I'd suggest to install dos2unix on the server. Windows can add ^M's to the end of lines which often breaks things horribly so once installed run it like 'dos2unix <file>' to clean it up.


Advertisement