Hi all I'm fairly new to permissions in a web server environment so please bare with me. I'm experiencing a problem (I believe) having to do with permissions to a directory on my server. The file permissions initially read drwx--S--- and I was able to connect with an FTP client signed in as the directory owner and manage the directory, but when I tryed to view them from a browser I get the "Forbidden" message saying I don't have permission to view the files. I noticed if I use sudo chmod -R 644 my_directory which changes the directory's permissions to drw-r-Sr-- and then use sudo chmod g+x my_directory to change the directory's permissions to drw-r-sr--, I can read the files from any browser, but can no longer transfer or view files via FTP to that directory. Any insight as to what the proper permissions should look like would be extremely appreciated.
vendredi 27 février 2015
Directory permissions for web server
Unlist update from update list openSuse
Is there a way to stop openSuse from trying to install a particular update? Everytime I have new updates, it tries to install kernel-desktop-3.11.10-25.1 (x64) along with a newer version (currently 3.19). If I leave it checked, the installation fails.. and if I uncheck it, next time I have updates this particular update reappears. It makes no sense to install it since I have a newer version available, so I would like to remove it from my recommended updates.
EDIT: It is tangential to the question at hand, but the error currently displayed if I try to install the update is "There is no update candidate for kernel-desktop-3.19.0-2.1.g1133f88.x86_64".
looping through a file on 2 lines in shell
I have a file which looks like this:
>a
TCCACTCCACGC
>b
ACCTCCAG
I want to loop through the file in such a way that it takes into account 2 lines at a time i.e >a and its seq and then I want to store those 2 lines in a variable and then further use my bioinformatics tools clustalomega
Some thing like this
for lines in test.fa;
do
clustalo -i $capture -o outputfile;
done
where capture variable first time when the loop goes has this format
>a
TCCACTCCACGC
then next time
>b
ACCTCCAG
How can I do this
Regards
How to delete part of a binary file without copying
I need to delete the first 2 bytes of a 6MB file. However, this is an embedded Linux with only 32 Mbytes RAM and less than 1 MB free flash memory.
I tried using dd, as:
1 - # dd bs=1 skip=2 count=1022 if=input of=ouput_1
2 - # dd bs=1024 skip=1 if=input of=ouput_2
3 - # rm -rf input
4 - # (dd if=ouput_1 ; dd if=ouput_2) > ouput
5 - # rm -rf ouput_1 ouput_2
With all files under the /tmp (mounted as tmpfs on RAM), my problem is that just before lines 3 and 5, the memory needed is 12 Mbyte (2x6MB), and the process sometimes fail and gives an "Not enough memory" error.
Is there a way I can remove the first 2 bytes without allocating twice the size of the file ? Can I use dd (or any other) to cut a binary file 'in place' ?
What's wrong with my NFS setup?
I had previously been able to configure an NFS server on a computer running CentOS 6.6, and to mount the file system in a Virtual Machine with the same OS and using autofs.
Last week I did a fresh install of all the OSs I had, and now for some reason I cannot get it to work. The server computer still runs CentOS 6.6, and the Virtual Machine is now running CentOS 7 (I also tried it with another Virtual Machine running Debian Wheezy, but it still didn't work).
The server (centosserv) is running on 192.168.1.89, and the client (centoscli, the CentOS 7 one) on 192.168.1.100.
The file system I want to share is /NFSSHARE and /NFSSHARE/mydir, and as such the /etc/exports file on the server contains the following:
/NFSSHARE 192.168.1.100(fsid=0,rw,sync,no_subtree_check,root_squash,anonuid=1000,anongid=1000)
/NFSSHARE/mydir 192.168.1.100(ro,sync,no_subtree_check)
If I run showmount -e I get this:
[root@centosserv ~]# showmount -e
Export list for centosserv:
/NFSSHARE/mydir 192.168.1.100
/NFSSHARE 192.168.1.100
So everything looks good so far.
On the client side, I edited the /etc/auto.master to include the following line:
/mnt/nfs /etc/auto.nfs-share --timeout=90
And then created the /etc/auto.nfs-share file with the following contents:
[root@centoscli ~]# cat /etc/auto.nfs-share
writeable_share -rw 192.168.1.89:/
non_writeable_share -ro 192.168.1.89:/mydir
This also seems to be working, given the below output:
[root@centoscli ~]# mount | grep nfs-share
/etc/auto.nfs-share on /mnt/nfs type autofs (rw,relatime,fd=18,pgrp=2401,timeout=90,minproto=5,maxproto=5,indirect)
At this point, /mnt/nfs/writeable_share and /mnt/nfs/non_writeable_share are not mounted, unless I try to access them directly, as per this tutorial (which is the same I had followed the last time I set up the NFS server*). So only after I tried ls -l /mnt/nfs/writeable_share should it be mounted. But the output I get is:
[root@centoscli ~]# ls -l /mnt/nfs/writeable_share
ls: cannot access /mnt/nfs/writeable_share: No such file or directory
I pinged the server from the client and vice versa, just to check that they could both reach each other, and they seem to do.
I did everything exactly the same way I had done the first time round, yet for some reason I cannot get it to work this time. I have tried doing this by editing the /etc/fstab file on the client side and manually instead of using autofs, but it doesn't seem to work that way either. Disabling iptables on the server side makes it work with fstab and manually, but not with autofs yet.
What else can I check, or where I have gone wrong?
*With the exception of the first three steps, since I have neither a service called nfs-common neither a /etc/default/nfs-common file.
EDIT
I was checking out this tutorial on a CentOS group on FB that, after the server side is supposedly settled and we're ready to start configuring the client side, says this:
Test if you can see NFS server:
showmount -e
So I'm guessing that using showmount -e on the client I should be able to get some info on the server, or it at least some acknowledgement that I can mount file systems from that server on this client. However, I tried using showmount -e 192.168.1.89 on the client side, and the only message I got was this:
clnt_create: RPC: Port mapper failure - Unable to receive: errno113 (No route to host)
I'm guessing this could be the problem, but I'm not sure what it means.
Why does Oracle Linux use two kernels?
Oracle Corporation distributes Oracle Linux with two alternative kernels.
- Red Hat Compatible Kernel
- Unbreakable Enterprise Kernel
How does using two kernels affect an operating system ?
How are two kernels managed ?
Terminal with image support
Is it possible to have sort of a hybrid terminal that can display isolated images in one or more designated panes?
As I understand it, modern terms are graphical emulations anyway, so obviously they have the underlying capability to display images.
The way I envision this working is one of two ways:
(1) have a designated or named area of the screen for graphics and the terminal text would wrap around it, or
(2) the images would just print inline with the lines of text; so you would give a command like "show mypicture.png" and the picture would appear below the current line and just scroll off the screen as more commands were entered.
Option (1) would make more sense for a curses-type environment where the application had 2D control over the terminal.