Announcement

Collapse
No announcement yet.

Bluefish editor doesn't see /var/www/

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bluefish editor doesn't see /var/www/

    I'm posting this here because Bluefish doesn't provide a contact email on their page, so I'm hoping someone here will be able to help.

    Bluefish editor... it launches and seems to work well, except it doesn't see the /var/www/ folder.
    I'm not all that skilled with chmod, and I think that's what is needed.

    Any suggestions?

    #2
    First: what has this to do with chmod? I am 87,5% sure: nothing. You could see man chmod for the manual pages.
    Second: there is no /var/www directory in a default *Ubuntu installation…

    Perhaps tell us what exactly you are trying to achieve first? Because to me this sounds a bit like an XY problem


    PS: Out of curiosity - what can Bluefish do that Kate can not?
    Last edited by Schwarzer Kater; May 30, 2024, 09:50 AM. Reason: added PS
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

    Comment


      #3
      /var/www was created when I set up my web server environment.

      I did say I think it's a chmod issue, not that it is. But why else can I not access a directory, if it's not a permissions thing?
      I need to be able to open files from /var/www, in order to work on them. I didn't think that needed explaining, considering the topic at hand, and the app I'm using.

      There are a few things I like about Bluefish, but that's beside the point. If it can't access certain directories, there's a reason, and I'm trying to find that reason so I can fix it.

      Comment


        #4
        So can you access and open files from your /var/www with another editor like Kate then?

        What do ls -l /var and ls -l /var/www say regarding permission settings?


        PS: Another way to test websites locally with e.g. Apache2 is to use another directory like $HOME/mywebsite and to modify /etc/apache2/apache2.conf accordingly - just saying… You would have to restart the apache2.service afterwards, of course.

        And I know I sound like a smartass: to run a public web server one should really understand Unix/Linux/BSD permissions for security's sake…
        Last edited by Schwarzer Kater; May 30, 2024, 11:08 AM. Reason: typos, added PS
        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

        Comment


          #5
          Originally posted by Schwarzer Kater View Post
          ...to run a public web server one should really understand Unix/Linux/BSD permissions for security's sake…
          It's not a public server. It's local, for web design. I'm new to Linux and Bluefish. On Windows I used PSPad (not available on Linux), which worked right out of the box like most editors. Not sure why Bluefish doesn't. It's been around for years itself.

          Comment


            #6
            It's been so long since I did web work but /var/www is owned by root. Typically, you are expected to write your file with an editor of your choice, save it and then ftp it to /var/www/xyz. Since it is a local environment, you can copy or move it from the directory you created into /var/www as root.
            Alternatively, you can chown /var/www like this: sudo chown -R user:user /var/www. This is probably not recommended for obvious reasons and may not work (I can not try it because I do not have Apache installed..-R means recursive and you should replace user with your own user name.

            Comment


              #7
              Originally posted by arsivci View Post
              It's been so long since I did web work but /var/www is owned by root. Typically, you are expected to write your file with an editor of your choice, save it and then ftp it to /var/www/xyz. Since it is a local environment, you can copy or move it from the directory you created into /var/www as root.
              Interesting information.

              In Windows, I could work directly with the same folder that holds all the files for the project (site). For example:
              • Everything was in C:/web/Apache24/htdocs
              • Any editor could access htdocs, automatic permissions. I could open files from there into the editor, and work on them.
              • Save the file to the same location.

              If I understand your post correctly, with the /var/www setup in Kubuntu, I need to basically have two sets of files. For example:
              1. Keep project files to be edited in /Documents/project.
              2. Open a file from there into Bluefish, and do whatever I need to do.
              3. Save it to /var/www/project (will Bluefish be able to save it to a dir it can't see?)
                • or... FTP internally to /var/www/project.

              Am I understanding that correctly?

              Originally posted by arsivci View Post
              Alternatively, you can chown /var/www like this: sudo chown -R user:user /var/www. This is probably not recommended for obvious reasons and may not work (I can not try it because I do not have Apache installed..-R means recursive and you should replace user with your own user name.

              Yeah I tried that, doesn't work.

              Comment


                #8
                More than likely /var and its sub-directories are owned by root. Doing anything substantive in that area will require the use of sudo.

                So the first thing to do is confirm that by using the CLI commands that Schwarzer Kater recommended:
                ls -l /var
                and then
                ls -l /var/www
                Such as this:
                ls -l /var
                total 44
                drwxr-xr-x 2 root root 4096 May 31 06:01 backups
                drwxr-xr-x 22 root root 4096 May 11 15:45 cache
                drwxrwxrwt 2 root whoopsie 4096 May 30 06:05 crash
                drwxr-xr-x 76 root root 4096 May 14 21:47 lib
                drwxrwsr-x 2 root staff 4096 Apr 22 08:08 local
                lrwxrwxrwx 1 root root 9 Apr 25 04:37 lock -> /run/lock
                drwxrwxr-x 14 root syslog 4096 May 31 06:01 log
                drwxrwsr-x 2 root mail 4096 May 28 21:19 mail
                drwxrwsrwt 2 root whoopsie 4096 Apr 25 04:40 metrics
                drwxr-xr-x 2 root root 4096 Apr 25 04:37 opt
                lrwxrwxrwx 1 root root 4 Apr 25 04:37 run -> /run
                drwxr-xr-x 8 root root 4096 May 14 21:47 spool
                drwxrwxrwt 15 root root 4096 May 31 06:12 tm

                The next brick house on the left
                Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                Comment


                  #9
                  Originally posted by jglen490 View Post
                  More than likely /var and its sub-directories are owned by root. Doing anything substantive in that area will require the use of sudo.

                  So the first thing to do is confirm that by using the CLI commands that Schwarzer Kater recommended...
                  Thanks. Yes, I ran those commands, and root is the root of the problem (haha, see what I did there?).

                  I tried chmod'ing my way in but it wouldn't change. In the meantime I took some advice from a StackExchange post for something else I needed to do, and succeeded in breaking something else that was above my pay grade to fix.
                  So I've reinstalled, and we'll see what happens. My younger brother says Bluefish works just fine for him, with the same setup. So I don't know what the wrinkle is here.

                  Comment


                    #10
                    Originally posted by Joel64 View Post

                    Thanks. Yes, I ran those commands, and root is the root of the problem (haha, see what I did there?).

                    I tried chmod'ing my way in but it wouldn't change. In the meantime I took some advice from a StackExchange post for something else I needed to do, and succeeded in breaking something else that was above my pay grade to fix.
                    So I've reinstalled, and we'll see what happens. My younger brother says Bluefish works just fine for him, with the same setup. So I don't know what the wrinkle is here.
                    The chmod ( change mode) command will do nothing to solve the problem of ownership. You need the chown (change owner) command for that try as root mkdir /var/www/project then chown user:user /var/www/project replacing the user with your usename and you now will have ownership of the directory and the ability of saving files there.

                    Comment


                      #11
                      Originally posted by RedGreen925 View Post

                      The chmod ( change mode) command will do nothing to solve the problem of ownership. You need the chown (change owner) command for that try as root mkdir /var/www/project then chown user:user /var/www/project replacing the user with your usename and you now will have ownership of the directory and the ability of saving files there.
                      chown!!! Well now I feel stupider than I already did, LOL. Of course chown. What was I thinking? I should know better, and I do. It's just been a while. That's my story, lol.

                      Comment


                        #12
                        Be careful with changing the ownership of directories and files. It's your platform, but just be careful with unintended consequences.
                        The next brick house on the left
                        Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                        Comment


                          #13
                          Originally posted by jglen490 View Post
                          Be careful with changing the ownership of directories and files. It's your platform, but just be careful with unintended consequences.
                          Yes, I looked into it more and decided to not go there for this issue.

                          Comment


                            #14
                            Yeah, if you can start an editor with elevated permissions, or one that will prompt for permissions upon saving, then you'll be good!
                            The next brick house on the left
                            Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                            Comment

                            Working...
                            X