Trying to access certain directories in Linux Amazon AWS instance - linux

My specific problem is (and with it a lot of others).
I am trying to access: /etc/sysconfig/iptables-config
In my AWS Linux instance.
I'm using WinSCP and I was able to upload/download files in the home directory, but I can't seem to do so in any other directory. Something about not having permissions. I just don't know how to change permission settings in the Instance? Or if it's a key problem? Or something else?
Thanks for any help!
P.S. Any tips on how to get a text editor onto the instance would be appreciated as well.

It turns out, I just needed to add the word sudo. (Face palm)

Related

How to update local files to Google Drive using command line Linux

I am new to Linux and I want to upload/update my local files to Google Drive automatically using the Linux command. Does someone have experience before? Appreciate it if someone can provide me with my resources/step by step to do it. Thanks.
I don't have experience with it but I found this article online that seems to do what you want.

Error: Cannot find module './commands/banner.js'

I recently pushed my entire bot to a hosting service called "Vultr" and tried running my bot but I was encountered with the error: Error: Cannot find module './commands/banner.js' and I don't know why this is happening as it works perfectly fine locally on my pc. If anyone knows why this is happening and the solution please provide how to fix it. I have provided images below to help.
Thanks, Gianni.
In my ubuntu terminal:
The code:
FileZilla directory: (Both commands folders have the javascript files)
Looking at Filezilla the folder name at Mythra is Commands, not commands (as written in your code). If that is a Linux server, folders are case sensitive unlike Windows machines which ignore case.
I would fix the folder names on your local machine and repush the site. If I remember right you can't simply change the name only by case, it doesn't keep. You need to change the folder to a different name then to what you want. For example:
Commands -> cCommands -> commands

Drupal 8: How to use private file system for node

Scenario:
I want to create a field field and attach it to a content type and willing to store the uploaded file into private file system.
I am using Drupal 8.6, php 7.1 and linux
My default file system is public, but for that specific file field, I want to store it, into private folder. So I created a folder outside my document root folder e.g. /var/www/private and set that into settings.php.
The purpose of this field is that, to allow, certain logged in users to able to download and restrict other.
I googled a lot, there are lot of suggestions, none worked or pointed the issue I am facing. I set the file directory as "dcouments/[date:custom:Y]-[date:custom:m]".
Now when i trying to upload a file, it gives me error like, folder "documents/2018-09" can't be created and upload failed. Surely it seems permission issue, i gave "private" folder to "rwxrwxr-x" permission, but its not working. Strangely it works in windows system.
Could anyone suggest, how to fix that? Whats going wrong there?
thanks in advance!
Permissions you defined may just be fine. The problem maybe that the private folder doesn't belong to www-data neither to its group. Check the real owner of the folder and set it to www-data. This should do the trick.
What I actually find out that, the web-server don't have permission to create sub-directory in the private folder.

Changing file permissions of unowned files in linux

I've written some code in C that needs to change a file modification time using utime(),
but I get permission error.
Is there a way changing file permissions even though I'm don't own the file?
Thanks in advance for any help.
Yes, be root. Linux by default doesn't have a fine-grained security model. Either you're root and have all rights, or you're a regular user and have only rights to your own stuff.

Accessing a windows share with groovy

Hey i'm trying to access a windows share to get a given XML file that I need to do some work on.
I'm trying to do this with a groovy script that will run in soapui, but i can't see how I can access the share without adding something like JCIFS or another external lib.
Is there anyway to access the share without external libs and if not could somebody point me to an example of how you access the share.
Okay I have tried with the jcifs and that works, but would not be the best.
But we can access with just a normal windows share access.
So if i use: " \\\\<ip>\\c\$\\folder" i can get to my files.

Resources